var bc = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
var rh = bc((ih, Ur) => {
	const Cc = function () {
		const t = document.createElement('link').relList;
		if (t && t.supports && t.supports('modulepreload')) return;
		for (const i of document.querySelectorAll('link[rel="modulepreload"]'))
			n(i);
		new MutationObserver((i) => {
			for (const o of i)
				if (o.type === 'childList')
					for (const s of o.addedNodes)
						s.tagName === 'LINK' && s.rel === 'modulepreload' && n(s);
		}).observe(document, { childList: !0, subtree: !0 });
		function r(i) {
			const o = {};
			return (
				i.integrity && (o.integrity = i.integrity),
				i.referrerpolicy && (o.referrerPolicy = i.referrerpolicy),
				i.crossorigin === 'use-credentials'
					? (o.credentials = 'include')
					: i.crossorigin === 'anonymous'
					? (o.credentials = 'omit')
					: (o.credentials = 'same-origin'),
				o
			);
		}
		function n(i) {
			if (i.ep) return;
			i.ep = !0;
			const o = r(i);
			fetch(i.href, o);
		}
	};
	Cc();
	function Ti(e, t) {
		const r = Object.create(null),
			n = e.split(',');
		for (let i = 0; i < n.length; i++) r[n[i]] = !0;
		return t ? (i) => !!r[i.toLowerCase()] : (i) => !!r[i];
	}
	const Sc =
			'itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly',
		Tc = Ti(Sc);
	function ps(e) {
		return !!e || e === '';
	}
	function sr(e) {
		if (q(e)) {
			const t = {};
			for (let r = 0; r < e.length; r++) {
				const n = e[r],
					i = Ee(n) ? kc(n) : sr(n);
				if (i) for (const o in i) t[o] = i[o];
			}
			return t;
		} else {
			if (Ee(e)) return e;
			if (Re(e)) return e;
		}
	}
	const xc = /;(?![^(]*\))/g,
		Pc = /:(.+)/;
	function kc(e) {
		const t = {};
		return (
			e.split(xc).forEach((r) => {
				if (r) {
					const n = r.split(Pc);
					n.length > 1 && (t[n[0].trim()] = n[1].trim());
				}
			}),
			t
		);
	}
	function yt(e) {
		let t = '';
		if (Ee(e)) t = e;
		else if (q(e))
			for (let r = 0; r < e.length; r++) {
				const n = yt(e[r]);
				n && (t += n + ' ');
			}
		else if (Re(e)) for (const r in e) e[r] && (t += r + ' ');
		return t.trim();
	}
	const Wt = (e) =>
			Ee(e)
				? e
				: e == null
				? ''
				: q(e) || (Re(e) && (e.toString === vs || !X(e.toString)))
				? JSON.stringify(e, hs, 2)
				: String(e),
		hs = (e, t) =>
			t && t.__v_isRef
				? hs(e, t.value)
				: ir(t)
				? {
						[`Map(${t.size})`]: [...t.entries()].reduce(
							(r, [n, i]) => ((r[`${n} =>`] = i), r),
							{}
						),
				  }
				: ms(t)
				? { [`Set(${t.size})`]: [...t.values()] }
				: Re(t) && !q(t) && !ys(t)
				? String(t)
				: t,
		me = {},
		nr = [],
		nt = () => {},
		Ec = () => !1,
		Rc = /^on[^a-z]/,
		mn = (e) => Rc.test(e),
		xi = (e) => e.startsWith('onUpdate:'),
		je = Object.assign,
		Pi = (e, t) => {
			const r = e.indexOf(t);
			r > -1 && e.splice(r, 1);
		},
		Oc = Object.prototype.hasOwnProperty,
		re = (e, t) => Oc.call(e, t),
		q = Array.isArray,
		ir = (e) => gn(e) === '[object Map]',
		ms = (e) => gn(e) === '[object Set]',
		X = (e) => typeof e == 'function',
		Ee = (e) => typeof e == 'string',
		ki = (e) => typeof e == 'symbol',
		Re = (e) => e !== null && typeof e == 'object',
		gs = (e) => Re(e) && X(e.then) && X(e.catch),
		vs = Object.prototype.toString,
		gn = (e) => vs.call(e),
		Mc = (e) => gn(e).slice(8, -1),
		ys = (e) => gn(e) === '[object Object]',
		Ei = (e) =>
			Ee(e) && e !== 'NaN' && e[0] !== '-' && '' + parseInt(e, 10) === e,
		Zr = Ti(
			',key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted'
		),
		vn = (e) => {
			const t = Object.create(null);
			return (r) => t[r] || (t[r] = e(r));
		},
		Dc = /-(\w)/g,
		ft = vn((e) => e.replace(Dc, (t, r) => (r ? r.toUpperCase() : ''))),
		Ic = /\B([A-Z])/g,
		dr = vn((e) => e.replace(Ic, '-$1').toLowerCase()),
		yn = vn((e) => e.charAt(0).toUpperCase() + e.slice(1)),
		jn = vn((e) => (e ? `on${yn(e)}` : '')),
		Ir = (e, t) => !Object.is(e, t),
		Fn = (e, t) => {
			for (let r = 0; r < e.length; r++) e[r](t);
		},
		sn = (e, t, r) => {
			Object.defineProperty(e, t, {
				configurable: !0,
				enumerable: !1,
				value: r,
			});
		},
		Ac = (e) => {
			const t = parseFloat(e);
			return isNaN(t) ? e : t;
		};
	let Qi;
	const wc = () =>
		Qi ||
		(Qi =
			typeof globalThis < 'u'
				? globalThis
				: typeof self < 'u'
				? self
				: typeof window < 'u'
				? window
				: typeof global < 'u'
				? global
				: {});
	let Ge;
	class _s {
		constructor(t = !1) {
			(this.active = !0),
				(this.effects = []),
				(this.cleanups = []),
				!t &&
					Ge &&
					((this.parent = Ge),
					(this.index = (Ge.scopes || (Ge.scopes = [])).push(this) - 1));
		}
		run(t) {
			if (this.active) {
				const r = Ge;
				try {
					return (Ge = this), t();
				} finally {
					Ge = r;
				}
			}
		}
		on() {
			Ge = this;
		}
		off() {
			Ge = this.parent;
		}
		stop(t) {
			if (this.active) {
				let r, n;
				for (r = 0, n = this.effects.length; r < n; r++) this.effects[r].stop();
				for (r = 0, n = this.cleanups.length; r < n; r++) this.cleanups[r]();
				if (this.scopes)
					for (r = 0, n = this.scopes.length; r < n; r++)
						this.scopes[r].stop(!0);
				if (this.parent && !t) {
					const i = this.parent.scopes.pop();
					i &&
						i !== this &&
						((this.parent.scopes[this.index] = i), (i.index = this.index));
				}
				this.active = !1;
			}
		}
	}
	function bs(e) {
		return new _s(e);
	}
	function jc(e, t = Ge) {
		t && t.active && t.effects.push(e);
	}
	function Fc() {
		return Ge;
	}
	function Bc(e) {
		Ge && Ge.cleanups.push(e);
	}
	const Ri = (e) => {
			const t = new Set(e);
			return (t.w = 0), (t.n = 0), t;
		},
		Cs = (e) => (e.w & Dt) > 0,
		Ss = (e) => (e.n & Dt) > 0,
		Lc = ({ deps: e }) => {
			if (e.length) for (let t = 0; t < e.length; t++) e[t].w |= Dt;
		},
		$c = (e) => {
			const { deps: t } = e;
			if (t.length) {
				let r = 0;
				for (let n = 0; n < t.length; n++) {
					const i = t[n];
					Cs(i) && !Ss(i) ? i.delete(e) : (t[r++] = i),
						(i.w &= ~Dt),
						(i.n &= ~Dt);
				}
				t.length = r;
			}
		},
		Hn = new WeakMap();
	let br = 0,
		Dt = 1;
	const Vn = 30;
	let Qe;
	const Ht = Symbol(''),
		Jn = Symbol('');
	class Oi {
		constructor(t, r = null, n) {
			(this.fn = t),
				(this.scheduler = r),
				(this.active = !0),
				(this.deps = []),
				(this.parent = void 0),
				jc(this, n);
		}
		run() {
			if (!this.active) return this.fn();
			let t = Qe,
				r = Rt;
			for (; t; ) {
				if (t === this) return;
				t = t.parent;
			}
			try {
				return (
					(this.parent = Qe),
					(Qe = this),
					(Rt = !0),
					(Dt = 1 << ++br),
					br <= Vn ? Lc(this) : eo(this),
					this.fn()
				);
			} finally {
				br <= Vn && $c(this),
					(Dt = 1 << --br),
					(Qe = this.parent),
					(Rt = r),
					(this.parent = void 0),
					this.deferStop && this.stop();
			}
		}
		stop() {
			Qe === this
				? (this.deferStop = !0)
				: this.active &&
				  (eo(this), this.onStop && this.onStop(), (this.active = !1));
		}
	}
	function eo(e) {
		const { deps: t } = e;
		if (t.length) {
			for (let r = 0; r < t.length; r++) t[r].delete(e);
			t.length = 0;
		}
	}
	let Rt = !0;
	const Ts = [];
	function pr() {
		Ts.push(Rt), (Rt = !1);
	}
	function hr() {
		const e = Ts.pop();
		Rt = e === void 0 ? !0 : e;
	}
	function Ve(e, t, r) {
		if (Rt && Qe) {
			let n = Hn.get(e);
			n || Hn.set(e, (n = new Map()));
			let i = n.get(r);
			i || n.set(r, (i = Ri())), xs(i);
		}
	}
	function xs(e, t) {
		let r = !1;
		br <= Vn ? Ss(e) || ((e.n |= Dt), (r = !Cs(e))) : (r = !e.has(Qe)),
			r && (e.add(Qe), Qe.deps.push(e));
	}
	function _t(e, t, r, n, i, o) {
		const s = Hn.get(e);
		if (!s) return;
		let c = [];
		if (t === 'clear') c = [...s.values()];
		else if (r === 'length' && q(e))
			s.forEach((a, l) => {
				(l === 'length' || l >= n) && c.push(a);
			});
		else
			switch ((r !== void 0 && c.push(s.get(r)), t)) {
				case 'add':
					q(e)
						? Ei(r) && c.push(s.get('length'))
						: (c.push(s.get(Ht)), ir(e) && c.push(s.get(Jn)));
					break;
				case 'delete':
					q(e) || (c.push(s.get(Ht)), ir(e) && c.push(s.get(Jn)));
					break;
				case 'set':
					ir(e) && c.push(s.get(Ht));
					break;
			}
		if (c.length === 1) c[0] && Kn(c[0]);
		else {
			const a = [];
			for (const l of c) l && a.push(...l);
			Kn(Ri(a));
		}
	}
	function Kn(e, t) {
		const r = q(e) ? e : [...e];
		for (const n of r) n.computed && to(n);
		for (const n of r) n.computed || to(n);
	}
	function to(e, t) {
		(e !== Qe || e.allowRecurse) && (e.scheduler ? e.scheduler() : e.run());
	}
	const Nc = Ti('__proto__,__v_isRef,__isVue'),
		Ps = new Set(
			Object.getOwnPropertyNames(Symbol)
				.filter((e) => e !== 'arguments' && e !== 'caller')
				.map((e) => Symbol[e])
				.filter(ki)
		),
		Uc = Mi(),
		Gc = Mi(!1, !0),
		zc = Mi(!0),
		ro = Wc();
	function Wc() {
		const e = {};
		return (
			['includes', 'indexOf', 'lastIndexOf'].forEach((t) => {
				e[t] = function (...r) {
					const n = se(this);
					for (let o = 0, s = this.length; o < s; o++) Ve(n, 'get', o + '');
					const i = n[t](...r);
					return i === -1 || i === !1 ? n[t](...r.map(se)) : i;
				};
			}),
			['push', 'pop', 'shift', 'unshift', 'splice'].forEach((t) => {
				e[t] = function (...r) {
					pr();
					const n = se(this)[t].apply(this, r);
					return hr(), n;
				};
			}),
			e
		);
	}
	function Mi(e = !1, t = !1) {
		return function (n, i, o) {
			if (i === '__v_isReactive') return !e;
			if (i === '__v_isReadonly') return e;
			if (i === '__v_isShallow') return t;
			if (i === '__v_raw' && o === (e ? (t ? sl : Ms) : t ? Os : Rs).get(n))
				return n;
			const s = q(n);
			if (!e && s && re(ro, i)) return Reflect.get(ro, i, o);
			const c = Reflect.get(n, i, o);
			return (ki(i) ? Ps.has(i) : Nc(i)) || (e || Ve(n, 'get', i), t)
				? c
				: _e(c)
				? s && Ei(i)
					? c
					: c.value
				: Re(c)
				? e
					? Pr(c)
					: ar(c)
				: c;
		};
	}
	const Hc = ks(),
		Vc = ks(!0);
	function ks(e = !1) {
		return function (r, n, i, o) {
			let s = r[n];
			if (Ar(s) && _e(s) && !_e(i)) return !1;
			if (
				!e &&
				!Ar(i) &&
				(qn(i) || ((i = se(i)), (s = se(s))), !q(r) && _e(s) && !_e(i))
			)
				return (s.value = i), !0;
			const c = q(r) && Ei(n) ? Number(n) < r.length : re(r, n),
				a = Reflect.set(r, n, i, o);
			return (
				r === se(o) &&
					(c ? Ir(i, s) && _t(r, 'set', n, i) : _t(r, 'add', n, i)),
				a
			);
		};
	}
	function Jc(e, t) {
		const r = re(e, t);
		e[t];
		const n = Reflect.deleteProperty(e, t);
		return n && r && _t(e, 'delete', t, void 0), n;
	}
	function Kc(e, t) {
		const r = Reflect.has(e, t);
		return (!ki(t) || !Ps.has(t)) && Ve(e, 'has', t), r;
	}
	function qc(e) {
		return Ve(e, 'iterate', q(e) ? 'length' : Ht), Reflect.ownKeys(e);
	}
	const Es = { get: Uc, set: Hc, deleteProperty: Jc, has: Kc, ownKeys: qc },
		Yc = {
			get: zc,
			set(e, t) {
				return !0;
			},
			deleteProperty(e, t) {
				return !0;
			},
		},
		Xc = je({}, Es, { get: Gc, set: Vc }),
		Di = (e) => e,
		_n = (e) => Reflect.getPrototypeOf(e);
	function zr(e, t, r = !1, n = !1) {
		e = e.__v_raw;
		const i = se(e),
			o = se(t);
		r || (t !== o && Ve(i, 'get', t), Ve(i, 'get', o));
		const { has: s } = _n(i),
			c = n ? Di : r ? wi : wr;
		if (s.call(i, t)) return c(e.get(t));
		if (s.call(i, o)) return c(e.get(o));
		e !== i && e.get(t);
	}
	function Wr(e, t = !1) {
		const r = this.__v_raw,
			n = se(r),
			i = se(e);
		return (
			t || (e !== i && Ve(n, 'has', e), Ve(n, 'has', i)),
			e === i ? r.has(e) : r.has(e) || r.has(i)
		);
	}
	function Hr(e, t = !1) {
		return (
			(e = e.__v_raw), !t && Ve(se(e), 'iterate', Ht), Reflect.get(e, 'size', e)
		);
	}
	function no(e) {
		e = se(e);
		const t = se(this);
		return _n(t).has.call(t, e) || (t.add(e), _t(t, 'add', e, e)), this;
	}
	function io(e, t) {
		t = se(t);
		const r = se(this),
			{ has: n, get: i } = _n(r);
		let o = n.call(r, e);
		o || ((e = se(e)), (o = n.call(r, e)));
		const s = i.call(r, e);
		return (
			r.set(e, t), o ? Ir(t, s) && _t(r, 'set', e, t) : _t(r, 'add', e, t), this
		);
	}
	function oo(e) {
		const t = se(this),
			{ has: r, get: n } = _n(t);
		let i = r.call(t, e);
		i || ((e = se(e)), (i = r.call(t, e))), n && n.call(t, e);
		const o = t.delete(e);
		return i && _t(t, 'delete', e, void 0), o;
	}
	function so() {
		const e = se(this),
			t = e.size !== 0,
			r = e.clear();
		return t && _t(e, 'clear', void 0, void 0), r;
	}
	function Vr(e, t) {
		return function (n, i) {
			const o = this,
				s = o.__v_raw,
				c = se(s),
				a = t ? Di : e ? wi : wr;
			return (
				!e && Ve(c, 'iterate', Ht),
				s.forEach((l, u) => n.call(i, a(l), a(u), o))
			);
		};
	}
	function Jr(e, t, r) {
		return function (...n) {
			const i = this.__v_raw,
				o = se(i),
				s = ir(o),
				c = e === 'entries' || (e === Symbol.iterator && s),
				a = e === 'keys' && s,
				l = i[e](...n),
				u = r ? Di : t ? wi : wr;
			return (
				!t && Ve(o, 'iterate', a ? Jn : Ht),
				{
					next() {
						const { value: f, done: d } = l.next();
						return d
							? { value: f, done: d }
							: { value: c ? [u(f[0]), u(f[1])] : u(f), done: d };
					},
					[Symbol.iterator]() {
						return this;
					},
				}
			);
		};
	}
	function xt(e) {
		return function (...t) {
			return e === 'delete' ? !1 : this;
		};
	}
	function Zc() {
		const e = {
				get(o) {
					return zr(this, o);
				},
				get size() {
					return Hr(this);
				},
				has: Wr,
				add: no,
				set: io,
				delete: oo,
				clear: so,
				forEach: Vr(!1, !1),
			},
			t = {
				get(o) {
					return zr(this, o, !1, !0);
				},
				get size() {
					return Hr(this);
				},
				has: Wr,
				add: no,
				set: io,
				delete: oo,
				clear: so,
				forEach: Vr(!1, !0),
			},
			r = {
				get(o) {
					return zr(this, o, !0);
				},
				get size() {
					return Hr(this, !0);
				},
				has(o) {
					return Wr.call(this, o, !0);
				},
				add: xt('add'),
				set: xt('set'),
				delete: xt('delete'),
				clear: xt('clear'),
				forEach: Vr(!0, !1),
			},
			n = {
				get(o) {
					return zr(this, o, !0, !0);
				},
				get size() {
					return Hr(this, !0);
				},
				has(o) {
					return Wr.call(this, o, !0);
				},
				add: xt('add'),
				set: xt('set'),
				delete: xt('delete'),
				clear: xt('clear'),
				forEach: Vr(!0, !0),
			};
		return (
			['keys', 'values', 'entries', Symbol.iterator].forEach((o) => {
				(e[o] = Jr(o, !1, !1)),
					(r[o] = Jr(o, !0, !1)),
					(t[o] = Jr(o, !1, !0)),
					(n[o] = Jr(o, !0, !0));
			}),
			[e, r, t, n]
		);
	}
	const [Qc, el, tl, rl] = Zc();
	function Ii(e, t) {
		const r = t ? (e ? rl : tl) : e ? el : Qc;
		return (n, i, o) =>
			i === '__v_isReactive'
				? !e
				: i === '__v_isReadonly'
				? e
				: i === '__v_raw'
				? n
				: Reflect.get(re(r, i) && i in n ? r : n, i, o);
	}
	const nl = { get: Ii(!1, !1) },
		il = { get: Ii(!1, !0) },
		ol = { get: Ii(!0, !1) },
		Rs = new WeakMap(),
		Os = new WeakMap(),
		Ms = new WeakMap(),
		sl = new WeakMap();
	function al(e) {
		switch (e) {
			case 'Object':
			case 'Array':
				return 1;
			case 'Map':
			case 'Set':
			case 'WeakMap':
			case 'WeakSet':
				return 2;
			default:
				return 0;
		}
	}
	function cl(e) {
		return e.__v_skip || !Object.isExtensible(e) ? 0 : al(Mc(e));
	}
	function ar(e) {
		return Ar(e) ? e : Ai(e, !1, Es, nl, Rs);
	}
	function ll(e) {
		return Ai(e, !1, Xc, il, Os);
	}
	function Pr(e) {
		return Ai(e, !0, Yc, ol, Ms);
	}
	function Ai(e, t, r, n, i) {
		if (!Re(e) || (e.__v_raw && !(t && e.__v_isReactive))) return e;
		const o = i.get(e);
		if (o) return o;
		const s = cl(e);
		if (s === 0) return e;
		const c = new Proxy(e, s === 2 ? n : r);
		return i.set(e, c), c;
	}
	function Ot(e) {
		return Ar(e) ? Ot(e.__v_raw) : !!(e && e.__v_isReactive);
	}
	function Ar(e) {
		return !!(e && e.__v_isReadonly);
	}
	function qn(e) {
		return !!(e && e.__v_isShallow);
	}
	function Ds(e) {
		return Ot(e) || Ar(e);
	}
	function se(e) {
		const t = e && e.__v_raw;
		return t ? se(t) : e;
	}
	function cr(e) {
		return sn(e, '__v_skip', !0), e;
	}
	const wr = (e) => (Re(e) ? ar(e) : e),
		wi = (e) => (Re(e) ? Pr(e) : e);
	function Is(e) {
		Rt && Qe && ((e = se(e)), xs(e.dep || (e.dep = Ri())));
	}
	function As(e, t) {
		(e = se(e)), e.dep && Kn(e.dep);
	}
	function _e(e) {
		return !!(e && e.__v_isRef === !0);
	}
	function fe(e) {
		return ws(e, !1);
	}
	function ul(e) {
		return ws(e, !0);
	}
	function ws(e, t) {
		return _e(e) ? e : new fl(e, t);
	}
	class fl {
		constructor(t, r) {
			(this.__v_isShallow = r),
				(this.dep = void 0),
				(this.__v_isRef = !0),
				(this._rawValue = r ? t : se(t)),
				(this._value = r ? t : wr(t));
		}
		get value() {
			return Is(this), this._value;
		}
		set value(t) {
			(t = this.__v_isShallow ? t : se(t)),
				Ir(t, this._rawValue) &&
					((this._rawValue = t),
					(this._value = this.__v_isShallow ? t : wr(t)),
					As(this));
		}
	}
	function Y(e) {
		return _e(e) ? e.value : e;
	}
	const dl = {
		get: (e, t, r) => Y(Reflect.get(e, t, r)),
		set: (e, t, r, n) => {
			const i = e[t];
			return _e(i) && !_e(r) ? ((i.value = r), !0) : Reflect.set(e, t, r, n);
		},
	};
	function js(e) {
		return Ot(e) ? e : new Proxy(e, dl);
	}
	function pl(e) {
		const t = q(e) ? new Array(e.length) : {};
		for (const r in e) t[r] = ml(e, r);
		return t;
	}
	class hl {
		constructor(t, r, n) {
			(this._object = t),
				(this._key = r),
				(this._defaultValue = n),
				(this.__v_isRef = !0);
		}
		get value() {
			const t = this._object[this._key];
			return t === void 0 ? this._defaultValue : t;
		}
		set value(t) {
			this._object[this._key] = t;
		}
	}
	function ml(e, t, r) {
		const n = e[t];
		return _e(n) ? n : new hl(e, t, r);
	}
	class gl {
		constructor(t, r, n, i) {
			(this._setter = r),
				(this.dep = void 0),
				(this.__v_isRef = !0),
				(this._dirty = !0),
				(this.effect = new Oi(t, () => {
					this._dirty || ((this._dirty = !0), As(this));
				})),
				(this.effect.computed = this),
				(this.effect.active = this._cacheable = !i),
				(this.__v_isReadonly = n);
		}
		get value() {
			const t = se(this);
			return (
				Is(t),
				(t._dirty || !t._cacheable) &&
					((t._dirty = !1), (t._value = t.effect.run())),
				t._value
			);
		}
		set value(t) {
			this._setter(t);
		}
	}
	function vl(e, t, r = !1) {
		let n, i;
		const o = X(e);
		return (
			o ? ((n = e), (i = nt)) : ((n = e.get), (i = e.set)),
			new gl(n, i, o || !i, r)
		);
	}
	function Mt(e, t, r, n) {
		let i;
		try {
			i = n ? e(...n) : e();
		} catch (o) {
			bn(o, t, r);
		}
		return i;
	}
	function Ye(e, t, r, n) {
		if (X(e)) {
			const o = Mt(e, t, r, n);
			return (
				o &&
					gs(o) &&
					o.catch((s) => {
						bn(s, t, r);
					}),
				o
			);
		}
		const i = [];
		for (let o = 0; o < e.length; o++) i.push(Ye(e[o], t, r, n));
		return i;
	}
	function bn(e, t, r, n = !0) {
		const i = t ? t.vnode : null;
		if (t) {
			let o = t.parent;
			const s = t.proxy,
				c = r;
			for (; o; ) {
				const l = o.ec;
				if (l) {
					for (let u = 0; u < l.length; u++) if (l[u](e, s, c) === !1) return;
				}
				o = o.parent;
			}
			const a = t.appContext.config.errorHandler;
			if (a) {
				Mt(a, null, 10, [e, s, c]);
				return;
			}
		}
		yl(e, r, i, n);
	}
	function yl(e, t, r, n = !0) {
		console.error(e);
	}
	let an = !1,
		Yn = !1;
	const ze = [];
	let mt = 0;
	const kr = [];
	let Cr = null,
		er = 0;
	const Er = [];
	let Pt = null,
		tr = 0;
	const Fs = Promise.resolve();
	let ji = null,
		Xn = null;
	function Fi(e) {
		const t = ji || Fs;
		return e ? t.then(this ? e.bind(this) : e) : t;
	}
	function _l(e) {
		let t = mt + 1,
			r = ze.length;
		for (; t < r; ) {
			const n = (t + r) >>> 1;
			jr(ze[n]) < e ? (t = n + 1) : (r = n);
		}
		return t;
	}
	function Bs(e) {
		(!ze.length || !ze.includes(e, an && e.allowRecurse ? mt + 1 : mt)) &&
			e !== Xn &&
			(e.id == null ? ze.push(e) : ze.splice(_l(e.id), 0, e), Ls());
	}
	function Ls() {
		!an && !Yn && ((Yn = !0), (ji = Fs.then(Us)));
	}
	function bl(e) {
		const t = ze.indexOf(e);
		t > mt && ze.splice(t, 1);
	}
	function $s(e, t, r, n) {
		q(e)
			? r.push(...e)
			: (!t || !t.includes(e, e.allowRecurse ? n + 1 : n)) && r.push(e),
			Ls();
	}
	function Cl(e) {
		$s(e, Cr, kr, er);
	}
	function Sl(e) {
		$s(e, Pt, Er, tr);
	}
	function Cn(e, t = null) {
		if (kr.length) {
			for (
				Xn = t, Cr = [...new Set(kr)], kr.length = 0, er = 0;
				er < Cr.length;
				er++
			)
				Cr[er]();
			(Cr = null), (er = 0), (Xn = null), Cn(e, t);
		}
	}
	function Ns(e) {
		if ((Cn(), Er.length)) {
			const t = [...new Set(Er)];
			if (((Er.length = 0), Pt)) {
				Pt.push(...t);
				return;
			}
			for (
				Pt = t, Pt.sort((r, n) => jr(r) - jr(n)), tr = 0;
				tr < Pt.length;
				tr++
			)
				Pt[tr]();
			(Pt = null), (tr = 0);
		}
	}
	const jr = (e) => (e.id == null ? 1 / 0 : e.id);
	function Us(e) {
		(Yn = !1), (an = !0), Cn(e), ze.sort((r, n) => jr(r) - jr(n));
		const t = nt;
		try {
			for (mt = 0; mt < ze.length; mt++) {
				const r = ze[mt];
				r && r.active !== !1 && Mt(r, null, 14);
			}
		} finally {
			(mt = 0),
				(ze.length = 0),
				Ns(),
				(an = !1),
				(ji = null),
				(ze.length || kr.length || Er.length) && Us(e);
		}
	}
	function Tl(e, t, ...r) {
		if (e.isUnmounted) return;
		const n = e.vnode.props || me;
		let i = r;
		const o = t.startsWith('update:'),
			s = o && t.slice(7);
		if (s && s in n) {
			const u = `${s === 'modelValue' ? 'model' : s}Modifiers`,
				{ number: f, trim: d } = n[u] || me;
			d && (i = r.map((h) => h.trim())), f && (i = r.map(Ac));
		}
		let c,
			a = n[(c = jn(t))] || n[(c = jn(ft(t)))];
		!a && o && (a = n[(c = jn(dr(t)))]), a && Ye(a, e, 6, i);
		const l = n[c + 'Once'];
		if (l) {
			if (!e.emitted) e.emitted = {};
			else if (e.emitted[c]) return;
			(e.emitted[c] = !0), Ye(l, e, 6, i);
		}
	}
	function Gs(e, t, r = !1) {
		const n = t.emitsCache,
			i = n.get(e);
		if (i !== void 0) return i;
		const o = e.emits;
		let s = {},
			c = !1;
		if (!X(e)) {
			const a = (l) => {
				const u = Gs(l, t, !0);
				u && ((c = !0), je(s, u));
			};
			!r && t.mixins.length && t.mixins.forEach(a),
				e.extends && a(e.extends),
				e.mixins && e.mixins.forEach(a);
		}
		return !o && !c
			? (n.set(e, null), null)
			: (q(o) ? o.forEach((a) => (s[a] = null)) : je(s, o), n.set(e, s), s);
	}
	function Sn(e, t) {
		return !e || !mn(t)
			? !1
			: ((t = t.slice(2).replace(/Once$/, '')),
			  re(e, t[0].toLowerCase() + t.slice(1)) || re(e, dr(t)) || re(e, t));
	}
	let we = null,
		Tn = null;
	function cn(e) {
		const t = we;
		return (we = e), (Tn = (e && e.type.__scopeId) || null), t;
	}
	function xn(e) {
		Tn = e;
	}
	function Pn() {
		Tn = null;
	}
	function qe(e, t = we, r) {
		if (!t || e._n) return e;
		const n = (...i) => {
			n._d && _o(-1);
			const o = cn(t),
				s = e(...i);
			return cn(o), n._d && _o(1), s;
		};
		return (n._n = !0), (n._c = !0), (n._d = !0), n;
	}
	function Bn(e) {
		const {
			type: t,
			vnode: r,
			proxy: n,
			withProxy: i,
			props: o,
			propsOptions: [s],
			slots: c,
			attrs: a,
			emit: l,
			render: u,
			renderCache: f,
			data: d,
			setupState: h,
			ctx: g,
			inheritAttrs: _,
		} = e;
		let R, S;
		const j = cn(e);
		try {
			if (r.shapeFlag & 4) {
				const b = i || n;
				(R = ut(u.call(b, b, f, o, h, d, g))), (S = a);
			} else {
				const b = t;
				(R = ut(
					b.length > 1 ? b(o, { attrs: a, slots: c, emit: l }) : b(o, null)
				)),
					(S = t.props ? a : xl(a));
			}
		} catch (b) {
			(Or.length = 0), bn(b, e, 1), (R = ue(Xe));
		}
		let D = R;
		if (S && _ !== !1) {
			const b = Object.keys(S),
				{ shapeFlag: P } = D;
			b.length && P & 7 && (s && b.some(xi) && (S = Pl(S, s)), (D = It(D, S)));
		}
		return (
			r.dirs &&
				((D = It(D)), (D.dirs = D.dirs ? D.dirs.concat(r.dirs) : r.dirs)),
			r.transition && (D.transition = r.transition),
			(R = D),
			cn(j),
			R
		);
	}
	const xl = (e) => {
			let t;
			for (const r in e)
				(r === 'class' || r === 'style' || mn(r)) &&
					((t || (t = {}))[r] = e[r]);
			return t;
		},
		Pl = (e, t) => {
			const r = {};
			for (const n in e) (!xi(n) || !(n.slice(9) in t)) && (r[n] = e[n]);
			return r;
		};
	function kl(e, t, r) {
		const { props: n, children: i, component: o } = e,
			{ props: s, children: c, patchFlag: a } = t,
			l = o.emitsOptions;
		if (t.dirs || t.transition) return !0;
		if (r && a >= 0) {
			if (a & 1024) return !0;
			if (a & 16) return n ? ao(n, s, l) : !!s;
			if (a & 8) {
				const u = t.dynamicProps;
				for (let f = 0; f < u.length; f++) {
					const d = u[f];
					if (s[d] !== n[d] && !Sn(l, d)) return !0;
				}
			}
		} else
			return (i || c) && (!c || !c.$stable)
				? !0
				: n === s
				? !1
				: n
				? s
					? ao(n, s, l)
					: !0
				: !!s;
		return !1;
	}
	function ao(e, t, r) {
		const n = Object.keys(t);
		if (n.length !== Object.keys(e).length) return !0;
		for (let i = 0; i < n.length; i++) {
			const o = n[i];
			if (t[o] !== e[o] && !Sn(r, o)) return !0;
		}
		return !1;
	}
	function El({ vnode: e, parent: t }, r) {
		for (; t && t.subTree === e; ) ((e = t.vnode).el = r), (t = t.parent);
	}
	const Rl = (e) => e.__isSuspense;
	function Ol(e, t) {
		t && t.pendingBranch
			? q(e)
				? t.effects.push(...e)
				: t.effects.push(e)
			: Sl(e);
	}
	function Ml(e, t) {
		if (Pe) {
			let r = Pe.provides;
			const n = Pe.parent && Pe.parent.provides;
			n === r && (r = Pe.provides = Object.create(n)), (r[e] = t);
		}
	}
	function Qr(e, t, r = !1) {
		const n = Pe || we;
		if (n) {
			const i =
				n.parent == null
					? n.vnode.appContext && n.vnode.appContext.provides
					: n.parent.provides;
			if (i && e in i) return i[e];
			if (arguments.length > 1) return r && X(t) ? t.call(n.proxy) : t;
		}
	}
	const co = {};
	function We(e, t, r) {
		return zs(e, t, r);
	}
	function zs(
		e,
		t,
		{ immediate: r, deep: n, flush: i, onTrack: o, onTrigger: s } = me
	) {
		const c = Pe;
		let a,
			l = !1,
			u = !1;
		if (
			(_e(e)
				? ((a = () => e.value), (l = qn(e)))
				: Ot(e)
				? ((a = () => e), (n = !0))
				: q(e)
				? ((u = !0),
				  (l = e.some((S) => Ot(S) || qn(S))),
				  (a = () =>
						e.map((S) => {
							if (_e(S)) return S.value;
							if (Ot(S)) return Ut(S);
							if (X(S)) return Mt(S, c, 2);
						})))
				: X(e)
				? t
					? (a = () => Mt(e, c, 2))
					: (a = () => {
							if (!(c && c.isUnmounted)) return f && f(), Ye(e, c, 3, [d]);
					  })
				: (a = nt),
			t && n)
		) {
			const S = a;
			a = () => Ut(S());
		}
		let f,
			d = (S) => {
				f = R.onStop = () => {
					Mt(S, c, 4);
				};
			};
		if (Lr)
			return (
				(d = nt), t ? r && Ye(t, c, 3, [a(), u ? [] : void 0, d]) : a(), nt
			);
		let h = u ? [] : co;
		const g = () => {
			if (!!R.active)
				if (t) {
					const S = R.run();
					(n || l || (u ? S.some((j, D) => Ir(j, h[D])) : Ir(S, h))) &&
						(f && f(), Ye(t, c, 3, [S, h === co ? void 0 : h, d]), (h = S));
				} else R.run();
		};
		g.allowRecurse = !!t;
		let _;
		i === 'sync'
			? (_ = g)
			: i === 'post'
			? (_ = () => $e(g, c && c.suspense))
			: (_ = () => Cl(g));
		const R = new Oi(a, _);
		return (
			t
				? r
					? g()
					: (h = R.run())
				: i === 'post'
				? $e(R.run.bind(R), c && c.suspense)
				: R.run(),
			() => {
				R.stop(), c && c.scope && Pi(c.scope.effects, R);
			}
		);
	}
	function Dl(e, t, r) {
		const n = this.proxy,
			i = Ee(e) ? (e.includes('.') ? Ws(n, e) : () => n[e]) : e.bind(n, n);
		let o;
		X(t) ? (o = t) : ((o = t.handler), (r = t));
		const s = Pe;
		lr(this);
		const c = zs(i, o.bind(n), r);
		return s ? lr(s) : Vt(), c;
	}
	function Ws(e, t) {
		const r = t.split('.');
		return () => {
			let n = e;
			for (let i = 0; i < r.length && n; i++) n = n[r[i]];
			return n;
		};
	}
	function Ut(e, t) {
		if (!Re(e) || e.__v_skip || ((t = t || new Set()), t.has(e))) return e;
		if ((t.add(e), _e(e))) Ut(e.value, t);
		else if (q(e)) for (let r = 0; r < e.length; r++) Ut(e[r], t);
		else if (ms(e) || ir(e))
			e.forEach((r) => {
				Ut(r, t);
			});
		else if (ys(e)) for (const r in e) Ut(e[r], t);
		return e;
	}
	function Il() {
		const e = {
			isMounted: !1,
			isLeaving: !1,
			isUnmounting: !1,
			leavingVNodes: new Map(),
		};
		return (
			Bi(() => {
				e.isMounted = !0;
			}),
			Ks(() => {
				e.isUnmounting = !0;
			}),
			e
		);
	}
	const Ke = [Function, Array],
		Al = {
			name: 'BaseTransition',
			props: {
				mode: String,
				appear: Boolean,
				persisted: Boolean,
				onBeforeEnter: Ke,
				onEnter: Ke,
				onAfterEnter: Ke,
				onEnterCancelled: Ke,
				onBeforeLeave: Ke,
				onLeave: Ke,
				onAfterLeave: Ke,
				onLeaveCancelled: Ke,
				onBeforeAppear: Ke,
				onAppear: Ke,
				onAfterAppear: Ke,
				onAppearCancelled: Ke,
			},
			setup(e, { slots: t }) {
				const r = Mn(),
					n = Il();
				let i;
				return () => {
					const o = t.default && Vs(t.default(), !0);
					if (!o || !o.length) return;
					let s = o[0];
					if (o.length > 1) {
						for (const _ of o)
							if (_.type !== Xe) {
								s = _;
								break;
							}
					}
					const c = se(e),
						{ mode: a } = c;
					if (n.isLeaving) return Ln(s);
					const l = lo(s);
					if (!l) return Ln(s);
					const u = Zn(l, c, n, r);
					Qn(l, u);
					const f = r.subTree,
						d = f && lo(f);
					let h = !1;
					const { getTransitionKey: g } = l.type;
					if (g) {
						const _ = g();
						i === void 0 ? (i = _) : _ !== i && ((i = _), (h = !0));
					}
					if (d && d.type !== Xe && (!$t(l, d) || h)) {
						const _ = Zn(d, c, n, r);
						if ((Qn(d, _), a === 'out-in'))
							return (
								(n.isLeaving = !0),
								(_.afterLeave = () => {
									(n.isLeaving = !1), r.update();
								}),
								Ln(s)
							);
						a === 'in-out' &&
							l.type !== Xe &&
							(_.delayLeave = (R, S, j) => {
								const D = Hs(n, d);
								(D[String(d.key)] = d),
									(R._leaveCb = () => {
										S(), (R._leaveCb = void 0), delete u.delayedLeave;
									}),
									(u.delayedLeave = j);
							});
					}
					return s;
				};
			},
		},
		wl = Al;
	function Hs(e, t) {
		const { leavingVNodes: r } = e;
		let n = r.get(t.type);
		return n || ((n = Object.create(null)), r.set(t.type, n)), n;
	}
	function Zn(e, t, r, n) {
		const {
				appear: i,
				mode: o,
				persisted: s = !1,
				onBeforeEnter: c,
				onEnter: a,
				onAfterEnter: l,
				onEnterCancelled: u,
				onBeforeLeave: f,
				onLeave: d,
				onAfterLeave: h,
				onLeaveCancelled: g,
				onBeforeAppear: _,
				onAppear: R,
				onAfterAppear: S,
				onAppearCancelled: j,
			} = t,
			D = String(e.key),
			b = Hs(r, e),
			P = (E, B) => {
				E && Ye(E, n, 9, B);
			},
			W = (E, B) => {
				const w = B[1];
				P(E, B),
					q(E) ? E.every((te) => te.length <= 1) && w() : E.length <= 1 && w();
			},
			A = {
				mode: o,
				persisted: s,
				beforeEnter(E) {
					let B = c;
					if (!r.isMounted)
						if (i) B = _ || c;
						else return;
					E._leaveCb && E._leaveCb(!0);
					const w = b[D];
					w && $t(e, w) && w.el._leaveCb && w.el._leaveCb(), P(B, [E]);
				},
				enter(E) {
					let B = a,
						w = l,
						te = u;
					if (!r.isMounted)
						if (i) (B = R || a), (w = S || l), (te = j || u);
						else return;
					let ge = !1;
					const Q = (E._enterCb = (y) => {
						ge ||
							((ge = !0),
							y ? P(te, [E]) : P(w, [E]),
							A.delayedLeave && A.delayedLeave(),
							(E._enterCb = void 0));
					});
					B ? W(B, [E, Q]) : Q();
				},
				leave(E, B) {
					const w = String(e.key);
					if ((E._enterCb && E._enterCb(!0), r.isUnmounting)) return B();
					P(f, [E]);
					let te = !1;
					const ge = (E._leaveCb = (Q) => {
						te ||
							((te = !0),
							B(),
							Q ? P(g, [E]) : P(h, [E]),
							(E._leaveCb = void 0),
							b[w] === e && delete b[w]);
					});
					(b[w] = e), d ? W(d, [E, ge]) : ge();
				},
				clone(E) {
					return Zn(E, t, r, n);
				},
			};
		return A;
	}
	function Ln(e) {
		if (kn(e)) return (e = It(e)), (e.children = null), e;
	}
	function lo(e) {
		return kn(e) ? (e.children ? e.children[0] : void 0) : e;
	}
	function Qn(e, t) {
		e.shapeFlag & 6 && e.component
			? Qn(e.component.subTree, t)
			: e.shapeFlag & 128
			? ((e.ssContent.transition = t.clone(e.ssContent)),
			  (e.ssFallback.transition = t.clone(e.ssFallback)))
			: (e.transition = t);
	}
	function Vs(e, t = !1, r) {
		let n = [],
			i = 0;
		for (let o = 0; o < e.length; o++) {
			let s = e[o];
			const c =
				r == null ? s.key : String(r) + String(s.key != null ? s.key : o);
			s.type === xe
				? (s.patchFlag & 128 && i++, (n = n.concat(Vs(s.children, t, c))))
				: (t || s.type !== Xe) && n.push(c != null ? It(s, { key: c }) : s);
		}
		if (i > 1) for (let o = 0; o < n.length; o++) n[o].patchFlag = -2;
		return n;
	}
	function it(e) {
		return X(e) ? { setup: e, name: e.name } : e;
	}
	const Rr = (e) => !!e.type.__asyncLoader,
		kn = (e) => e.type.__isKeepAlive;
	function jl(e, t) {
		Js(e, 'a', t);
	}
	function Fl(e, t) {
		Js(e, 'da', t);
	}
	function Js(e, t, r = Pe) {
		const n =
			e.__wdc ||
			(e.__wdc = () => {
				let i = r;
				for (; i; ) {
					if (i.isDeactivated) return;
					i = i.parent;
				}
				return e();
			});
		if ((En(t, n, r), r)) {
			let i = r.parent;
			for (; i && i.parent; )
				kn(i.parent.vnode) && Bl(n, t, r, i), (i = i.parent);
		}
	}
	function Bl(e, t, r, n) {
		const i = En(t, e, n, !0);
		Li(() => {
			Pi(n[t], i);
		}, r);
	}
	function En(e, t, r = Pe, n = !1) {
		if (r) {
			const i = r[e] || (r[e] = []),
				o =
					t.__weh ||
					(t.__weh = (...s) => {
						if (r.isUnmounted) return;
						pr(), lr(r);
						const c = Ye(t, r, e, s);
						return Vt(), hr(), c;
					});
			return n ? i.unshift(o) : i.push(o), o;
		}
	}
	const bt =
			(e) =>
			(t, r = Pe) =>
				(!Lr || e === 'sp') && En(e, t, r),
		Ll = bt('bm'),
		Bi = bt('m'),
		$l = bt('bu'),
		Nl = bt('u'),
		Ks = bt('bum'),
		Li = bt('um'),
		Ul = bt('sp'),
		Gl = bt('rtg'),
		zl = bt('rtc');
	function Wl(e, t = Pe) {
		En('ec', e, t);
	}
	function qs(e, t) {
		const r = we;
		if (r === null) return e;
		const n = Dn(r) || r.proxy,
			i = e.dirs || (e.dirs = []);
		for (let o = 0; o < t.length; o++) {
			let [s, c, a, l = me] = t[o];
			X(s) && (s = { mounted: s, updated: s }),
				s.deep && Ut(c),
				i.push({
					dir: s,
					instance: n,
					value: c,
					oldValue: void 0,
					arg: a,
					modifiers: l,
				});
		}
		return e;
	}
	function wt(e, t, r, n) {
		const i = e.dirs,
			o = t && t.dirs;
		for (let s = 0; s < i.length; s++) {
			const c = i[s];
			o && (c.oldValue = o[s].value);
			let a = c.dir[n];
			a && (pr(), Ye(a, r, 8, [e.el, c, e, t]), hr());
		}
	}
	const Hl = 'components',
		Vl = 'directives',
		Jl = Symbol();
	function Ys(e) {
		return Kl(Vl, e);
	}
	function Kl(e, t, r = !0, n = !1) {
		const i = we || Pe;
		if (i) {
			const o = i.type;
			if (e === Hl) {
				const c = Tu(o, !1);
				if (c && (c === t || c === ft(t) || c === yn(ft(t)))) return o;
			}
			const s = uo(i[e] || o[e], t) || uo(i.appContext[e], t);
			return !s && n ? o : s;
		}
	}
	function uo(e, t) {
		return e && (e[t] || e[ft(t)] || e[yn(ft(t))]);
	}
	function fo(e, t, r, n) {
		let i;
		const o = r && r[n];
		if (q(e) || Ee(e)) {
			i = new Array(e.length);
			for (let s = 0, c = e.length; s < c; s++)
				i[s] = t(e[s], s, void 0, o && o[s]);
		} else if (typeof e == 'number') {
			i = new Array(e);
			for (let s = 0; s < e; s++) i[s] = t(s + 1, s, void 0, o && o[s]);
		} else if (Re(e))
			if (e[Symbol.iterator])
				i = Array.from(e, (s, c) => t(s, c, void 0, o && o[c]));
			else {
				const s = Object.keys(e);
				i = new Array(s.length);
				for (let c = 0, a = s.length; c < a; c++) {
					const l = s[c];
					i[c] = t(e[l], l, c, o && o[c]);
				}
			}
		else i = [];
		return r && (r[n] = i), i;
	}
	function Rn(e, t, r = {}, n, i) {
		if (we.isCE || (we.parent && Rr(we.parent) && we.parent.isCE))
			return ue('slot', t === 'default' ? null : { name: t }, n && n());
		let o = e[t];
		o && o._c && (o._d = !1), de();
		const s = o && Xs(o(r)),
			c = Br(
				xe,
				{ key: r.key || `_${t}` },
				s || (n ? n() : []),
				s && e._ === 1 ? 64 : -2
			);
		return (
			!i && c.scopeId && (c.slotScopeIds = [c.scopeId + '-s']),
			o && o._c && (o._d = !0),
			c
		);
	}
	function Xs(e) {
		return e.some((t) =>
			ca(t) ? !(t.type === Xe || (t.type === xe && !Xs(t.children))) : !0
		)
			? e
			: null;
	}
	const ei = (e) => (e ? (ua(e) ? Dn(e) || e.proxy : ei(e.parent)) : null),
		ln = je(Object.create(null), {
			$: (e) => e,
			$el: (e) => e.vnode.el,
			$data: (e) => e.data,
			$props: (e) => e.props,
			$attrs: (e) => e.attrs,
			$slots: (e) => e.slots,
			$refs: (e) => e.refs,
			$parent: (e) => ei(e.parent),
			$root: (e) => ei(e.root),
			$emit: (e) => e.emit,
			$options: (e) => Qs(e),
			$forceUpdate: (e) => e.f || (e.f = () => Bs(e.update)),
			$nextTick: (e) => e.n || (e.n = Fi.bind(e.proxy)),
			$watch: (e) => Dl.bind(e),
		}),
		ql = {
			get({ _: e }, t) {
				const {
					ctx: r,
					setupState: n,
					data: i,
					props: o,
					accessCache: s,
					type: c,
					appContext: a,
				} = e;
				let l;
				if (t[0] !== '$') {
					const h = s[t];
					if (h !== void 0)
						switch (h) {
							case 1:
								return n[t];
							case 2:
								return i[t];
							case 4:
								return r[t];
							case 3:
								return o[t];
						}
					else {
						if (n !== me && re(n, t)) return (s[t] = 1), n[t];
						if (i !== me && re(i, t)) return (s[t] = 2), i[t];
						if ((l = e.propsOptions[0]) && re(l, t)) return (s[t] = 3), o[t];
						if (r !== me && re(r, t)) return (s[t] = 4), r[t];
						ti && (s[t] = 0);
					}
				}
				const u = ln[t];
				let f, d;
				if (u) return t === '$attrs' && Ve(e, 'get', t), u(e);
				if ((f = c.__cssModules) && (f = f[t])) return f;
				if (r !== me && re(r, t)) return (s[t] = 4), r[t];
				if (((d = a.config.globalProperties), re(d, t))) return d[t];
			},
			set({ _: e }, t, r) {
				const { data: n, setupState: i, ctx: o } = e;
				return i !== me && re(i, t)
					? ((i[t] = r), !0)
					: n !== me && re(n, t)
					? ((n[t] = r), !0)
					: re(e.props, t) || (t[0] === '$' && t.slice(1) in e)
					? !1
					: ((o[t] = r), !0);
			},
			has(
				{
					_: {
						data: e,
						setupState: t,
						accessCache: r,
						ctx: n,
						appContext: i,
						propsOptions: o,
					},
				},
				s
			) {
				let c;
				return (
					!!r[s] ||
					(e !== me && re(e, s)) ||
					(t !== me && re(t, s)) ||
					((c = o[0]) && re(c, s)) ||
					re(n, s) ||
					re(ln, s) ||
					re(i.config.globalProperties, s)
				);
			},
			defineProperty(e, t, r) {
				return (
					r.get != null
						? (e._.accessCache[t] = 0)
						: re(r, 'value') && this.set(e, t, r.value, null),
					Reflect.defineProperty(e, t, r)
				);
			},
		};
	let ti = !0;
	function Yl(e) {
		const t = Qs(e),
			r = e.proxy,
			n = e.ctx;
		(ti = !1), t.beforeCreate && po(t.beforeCreate, e, 'bc');
		const {
			data: i,
			computed: o,
			methods: s,
			watch: c,
			provide: a,
			inject: l,
			created: u,
			beforeMount: f,
			mounted: d,
			beforeUpdate: h,
			updated: g,
			activated: _,
			deactivated: R,
			beforeDestroy: S,
			beforeUnmount: j,
			destroyed: D,
			unmounted: b,
			render: P,
			renderTracked: W,
			renderTriggered: A,
			errorCaptured: E,
			serverPrefetch: B,
			expose: w,
			inheritAttrs: te,
			components: ge,
			directives: Q,
			filters: y,
		} = t;
		if ((l && Xl(l, n, null, e.appContext.config.unwrapInjectedRef), s))
			for (const N in s) {
				const $ = s[N];
				X($) && (n[N] = $.bind(r));
			}
		if (i) {
			const N = i.call(r, r);
			Re(N) && (e.data = ar(N));
		}
		if (((ti = !0), o))
			for (const N in o) {
				const $ = o[N],
					Z = X($) ? $.bind(r, r) : X($.get) ? $.get.bind(r, r) : nt,
					ee = !X($) && X($.set) ? $.set.bind(r) : nt,
					ne = ke({ get: Z, set: ee });
				Object.defineProperty(n, N, {
					enumerable: !0,
					configurable: !0,
					get: () => ne.value,
					set: (ce) => (ne.value = ce),
				});
			}
		if (c) for (const N in c) Zs(c[N], n, r, N);
		if (a) {
			const N = X(a) ? a.call(r) : a;
			Reflect.ownKeys(N).forEach(($) => {
				Ml($, N[$]);
			});
		}
		u && po(u, e, 'c');
		function G(N, $) {
			q($) ? $.forEach((Z) => N(Z.bind(r))) : $ && N($.bind(r));
		}
		if (
			(G(Ll, f),
			G(Bi, d),
			G($l, h),
			G(Nl, g),
			G(jl, _),
			G(Fl, R),
			G(Wl, E),
			G(zl, W),
			G(Gl, A),
			G(Ks, j),
			G(Li, b),
			G(Ul, B),
			q(w))
		)
			if (w.length) {
				const N = e.exposed || (e.exposed = {});
				w.forEach(($) => {
					Object.defineProperty(N, $, {
						get: () => r[$],
						set: (Z) => (r[$] = Z),
					});
				});
			} else e.exposed || (e.exposed = {});
		P && e.render === nt && (e.render = P),
			te != null && (e.inheritAttrs = te),
			ge && (e.components = ge),
			Q && (e.directives = Q);
	}
	function Xl(e, t, r = nt, n = !1) {
		q(e) && (e = ri(e));
		for (const i in e) {
			const o = e[i];
			let s;
			Re(o)
				? 'default' in o
					? (s = Qr(o.from || i, o.default, !0))
					: (s = Qr(o.from || i))
				: (s = Qr(o)),
				_e(s) && n
					? Object.defineProperty(t, i, {
							enumerable: !0,
							configurable: !0,
							get: () => s.value,
							set: (c) => (s.value = c),
					  })
					: (t[i] = s);
		}
	}
	function po(e, t, r) {
		Ye(q(e) ? e.map((n) => n.bind(t.proxy)) : e.bind(t.proxy), t, r);
	}
	function Zs(e, t, r, n) {
		const i = n.includes('.') ? Ws(r, n) : () => r[n];
		if (Ee(e)) {
			const o = t[e];
			X(o) && We(i, o);
		} else if (X(e)) We(i, e.bind(r));
		else if (Re(e))
			if (q(e)) e.forEach((o) => Zs(o, t, r, n));
			else {
				const o = X(e.handler) ? e.handler.bind(r) : t[e.handler];
				X(o) && We(i, o, e);
			}
	}
	function Qs(e) {
		const t = e.type,
			{ mixins: r, extends: n } = t,
			{
				mixins: i,
				optionsCache: o,
				config: { optionMergeStrategies: s },
			} = e.appContext,
			c = o.get(t);
		let a;
		return (
			c
				? (a = c)
				: !i.length && !r && !n
				? (a = t)
				: ((a = {}),
				  i.length && i.forEach((l) => un(a, l, s, !0)),
				  un(a, t, s)),
			o.set(t, a),
			a
		);
	}
	function un(e, t, r, n = !1) {
		const { mixins: i, extends: o } = t;
		o && un(e, o, r, !0), i && i.forEach((s) => un(e, s, r, !0));
		for (const s in t)
			if (!(n && s === 'expose')) {
				const c = Zl[s] || (r && r[s]);
				e[s] = c ? c(e[s], t[s]) : t[s];
			}
		return e;
	}
	const Zl = {
		data: ho,
		props: Lt,
		emits: Lt,
		methods: Lt,
		computed: Lt,
		beforeCreate: Be,
		created: Be,
		beforeMount: Be,
		mounted: Be,
		beforeUpdate: Be,
		updated: Be,
		beforeDestroy: Be,
		beforeUnmount: Be,
		destroyed: Be,
		unmounted: Be,
		activated: Be,
		deactivated: Be,
		errorCaptured: Be,
		serverPrefetch: Be,
		components: Lt,
		directives: Lt,
		watch: eu,
		provide: ho,
		inject: Ql,
	};
	function ho(e, t) {
		return t
			? e
				? function () {
						return je(
							X(e) ? e.call(this, this) : e,
							X(t) ? t.call(this, this) : t
						);
				  }
				: t
			: e;
	}
	function Ql(e, t) {
		return Lt(ri(e), ri(t));
	}
	function ri(e) {
		if (q(e)) {
			const t = {};
			for (let r = 0; r < e.length; r++) t[e[r]] = e[r];
			return t;
		}
		return e;
	}
	function Be(e, t) {
		return e ? [...new Set([].concat(e, t))] : t;
	}
	function Lt(e, t) {
		return e ? je(je(Object.create(null), e), t) : t;
	}
	function eu(e, t) {
		if (!e) return t;
		if (!t) return e;
		const r = je(Object.create(null), e);
		for (const n in t) r[n] = Be(e[n], t[n]);
		return r;
	}
	function tu(e, t, r, n = !1) {
		const i = {},
			o = {};
		sn(o, On, 1), (e.propsDefaults = Object.create(null)), ea(e, t, i, o);
		for (const s in e.propsOptions[0]) s in i || (i[s] = void 0);
		r
			? (e.props = n ? i : ll(i))
			: e.type.props
			? (e.props = i)
			: (e.props = o),
			(e.attrs = o);
	}
	function ru(e, t, r, n) {
		const {
				props: i,
				attrs: o,
				vnode: { patchFlag: s },
			} = e,
			c = se(i),
			[a] = e.propsOptions;
		let l = !1;
		if ((n || s > 0) && !(s & 16)) {
			if (s & 8) {
				const u = e.vnode.dynamicProps;
				for (let f = 0; f < u.length; f++) {
					let d = u[f];
					if (Sn(e.emitsOptions, d)) continue;
					const h = t[d];
					if (a)
						if (re(o, d)) h !== o[d] && ((o[d] = h), (l = !0));
						else {
							const g = ft(d);
							i[g] = ni(a, c, g, h, e, !1);
						}
					else h !== o[d] && ((o[d] = h), (l = !0));
				}
			}
		} else {
			ea(e, t, i, o) && (l = !0);
			let u;
			for (const f in c)
				(!t || (!re(t, f) && ((u = dr(f)) === f || !re(t, u)))) &&
					(a
						? r &&
						  (r[f] !== void 0 || r[u] !== void 0) &&
						  (i[f] = ni(a, c, f, void 0, e, !0))
						: delete i[f]);
			if (o !== c)
				for (const f in o) (!t || (!re(t, f) && !0)) && (delete o[f], (l = !0));
		}
		l && _t(e, 'set', '$attrs');
	}
	function ea(e, t, r, n) {
		const [i, o] = e.propsOptions;
		let s = !1,
			c;
		if (t)
			for (let a in t) {
				if (Zr(a)) continue;
				const l = t[a];
				let u;
				i && re(i, (u = ft(a)))
					? !o || !o.includes(u)
						? (r[u] = l)
						: ((c || (c = {}))[u] = l)
					: Sn(e.emitsOptions, a) ||
					  ((!(a in n) || l !== n[a]) && ((n[a] = l), (s = !0)));
			}
		if (o) {
			const a = se(r),
				l = c || me;
			for (let u = 0; u < o.length; u++) {
				const f = o[u];
				r[f] = ni(i, a, f, l[f], e, !re(l, f));
			}
		}
		return s;
	}
	function ni(e, t, r, n, i, o) {
		const s = e[r];
		if (s != null) {
			const c = re(s, 'default');
			if (c && n === void 0) {
				const a = s.default;
				if (s.type !== Function && X(a)) {
					const { propsDefaults: l } = i;
					r in l ? (n = l[r]) : (lr(i), (n = l[r] = a.call(null, t)), Vt());
				} else n = a;
			}
			s[0] &&
				(o && !c ? (n = !1) : s[1] && (n === '' || n === dr(r)) && (n = !0));
		}
		return n;
	}
	function ta(e, t, r = !1) {
		const n = t.propsCache,
			i = n.get(e);
		if (i) return i;
		const o = e.props,
			s = {},
			c = [];
		let a = !1;
		if (!X(e)) {
			const u = (f) => {
				a = !0;
				const [d, h] = ta(f, t, !0);
				je(s, d), h && c.push(...h);
			};
			!r && t.mixins.length && t.mixins.forEach(u),
				e.extends && u(e.extends),
				e.mixins && e.mixins.forEach(u);
		}
		if (!o && !a) return n.set(e, nr), nr;
		if (q(o))
			for (let u = 0; u < o.length; u++) {
				const f = ft(o[u]);
				mo(f) && (s[f] = me);
			}
		else if (o)
			for (const u in o) {
				const f = ft(u);
				if (mo(f)) {
					const d = o[u],
						h = (s[f] = q(d) || X(d) ? { type: d } : d);
					if (h) {
						const g = yo(Boolean, h.type),
							_ = yo(String, h.type);
						(h[0] = g > -1),
							(h[1] = _ < 0 || g < _),
							(g > -1 || re(h, 'default')) && c.push(f);
					}
				}
			}
		const l = [s, c];
		return n.set(e, l), l;
	}
	function mo(e) {
		return e[0] !== '$';
	}
	function go(e) {
		const t = e && e.toString().match(/^\s*function (\w+)/);
		return t ? t[1] : e === null ? 'null' : '';
	}
	function vo(e, t) {
		return go(e) === go(t);
	}
	function yo(e, t) {
		return q(t) ? t.findIndex((r) => vo(r, e)) : X(t) && vo(t, e) ? 0 : -1;
	}
	const ra = (e) => e[0] === '_' || e === '$stable',
		$i = (e) => (q(e) ? e.map(ut) : [ut(e)]),
		nu = (e, t, r) => {
			if (t._n) return t;
			const n = qe((...i) => $i(t(...i)), r);
			return (n._c = !1), n;
		},
		na = (e, t, r) => {
			const n = e._ctx;
			for (const i in e) {
				if (ra(i)) continue;
				const o = e[i];
				if (X(o)) t[i] = nu(i, o, n);
				else if (o != null) {
					const s = $i(o);
					t[i] = () => s;
				}
			}
		},
		ia = (e, t) => {
			const r = $i(t);
			e.slots.default = () => r;
		},
		iu = (e, t) => {
			if (e.vnode.shapeFlag & 32) {
				const r = t._;
				r ? ((e.slots = se(t)), sn(t, '_', r)) : na(t, (e.slots = {}));
			} else (e.slots = {}), t && ia(e, t);
			sn(e.slots, On, 1);
		},
		ou = (e, t, r) => {
			const { vnode: n, slots: i } = e;
			let o = !0,
				s = me;
			if (n.shapeFlag & 32) {
				const c = t._;
				c
					? r && c === 1
						? (o = !1)
						: (je(i, t), !r && c === 1 && delete i._)
					: ((o = !t.$stable), na(t, i)),
					(s = t);
			} else t && (ia(e, t), (s = { default: 1 }));
			if (o) for (const c in i) !ra(c) && !(c in s) && delete i[c];
		};
	function oa() {
		return {
			app: null,
			config: {
				isNativeTag: Ec,
				performance: !1,
				globalProperties: {},
				optionMergeStrategies: {},
				errorHandler: void 0,
				warnHandler: void 0,
				compilerOptions: {},
			},
			mixins: [],
			components: {},
			directives: {},
			provides: Object.create(null),
			optionsCache: new WeakMap(),
			propsCache: new WeakMap(),
			emitsCache: new WeakMap(),
		};
	}
	let su = 0;
	function au(e, t) {
		return function (n, i = null) {
			X(n) || (n = Object.assign({}, n)), i != null && !Re(i) && (i = null);
			const o = oa(),
				s = new Set();
			let c = !1;
			const a = (o.app = {
				_uid: su++,
				_component: n,
				_props: i,
				_container: null,
				_context: o,
				_instance: null,
				version: Pu,
				get config() {
					return o.config;
				},
				set config(l) {},
				use(l, ...u) {
					return (
						s.has(l) ||
							(l && X(l.install)
								? (s.add(l), l.install(a, ...u))
								: X(l) && (s.add(l), l(a, ...u))),
						a
					);
				},
				mixin(l) {
					return o.mixins.includes(l) || o.mixins.push(l), a;
				},
				component(l, u) {
					return u ? ((o.components[l] = u), a) : o.components[l];
				},
				directive(l, u) {
					return u ? ((o.directives[l] = u), a) : o.directives[l];
				},
				mount(l, u, f) {
					if (!c) {
						const d = ue(n, i);
						return (
							(d.appContext = o),
							u && t ? t(d, l) : e(d, l, f),
							(c = !0),
							(a._container = l),
							(l.__vue_app__ = a),
							Dn(d.component) || d.component.proxy
						);
					}
				},
				unmount() {
					c && (e(null, a._container), delete a._container.__vue_app__);
				},
				provide(l, u) {
					return (o.provides[l] = u), a;
				},
			});
			return a;
		};
	}
	function ii(e, t, r, n, i = !1) {
		if (q(e)) {
			e.forEach((d, h) => ii(d, t && (q(t) ? t[h] : t), r, n, i));
			return;
		}
		if (Rr(n) && !i) return;
		const o = n.shapeFlag & 4 ? Dn(n.component) || n.component.proxy : n.el,
			s = i ? null : o,
			{ i: c, r: a } = e,
			l = t && t.r,
			u = c.refs === me ? (c.refs = {}) : c.refs,
			f = c.setupState;
		if (
			(l != null &&
				l !== a &&
				(Ee(l)
					? ((u[l] = null), re(f, l) && (f[l] = null))
					: _e(l) && (l.value = null)),
			X(a))
		)
			Mt(a, c, 12, [s, u]);
		else {
			const d = Ee(a),
				h = _e(a);
			if (d || h) {
				const g = () => {
					if (e.f) {
						const _ = d ? u[a] : a.value;
						i
							? q(_) && Pi(_, o)
							: q(_)
							? _.includes(o) || _.push(o)
							: d
							? ((u[a] = [o]), re(f, a) && (f[a] = u[a]))
							: ((a.value = [o]), e.k && (u[e.k] = a.value));
					} else
						d
							? ((u[a] = s), re(f, a) && (f[a] = s))
							: h && ((a.value = s), e.k && (u[e.k] = s));
				};
				s ? ((g.id = -1), $e(g, r)) : g();
			}
		}
	}
	const $e = Ol;
	function cu(e) {
		return lu(e);
	}
	function lu(e, t) {
		const r = wc();
		r.__VUE__ = !0;
		const {
				insert: n,
				remove: i,
				patchProp: o,
				createElement: s,
				createText: c,
				createComment: a,
				setText: l,
				setElementText: u,
				parentNode: f,
				nextSibling: d,
				setScopeId: h = nt,
				cloneNode: g,
				insertStaticContent: _,
			} = e,
			R = (
				p,
				m,
				C,
				x = null,
				T = null,
				M = null,
				F = !1,
				O = null,
				I = !!m.dynamicChildren
			) => {
				if (p === m) return;
				p && !$t(p, m) && ((x = ot(p)), Se(p, T, M, !0), (p = null)),
					m.patchFlag === -2 && ((I = !1), (m.dynamicChildren = null));
				const { type: k, ref: z, shapeFlag: U } = m;
				switch (k) {
					case Ni:
						S(p, m, C, x);
						break;
					case Xe:
						j(p, m, C, x);
						break;
					case $n:
						p == null && D(m, C, x, F);
						break;
					case xe:
						Q(p, m, C, x, T, M, F, O, I);
						break;
					default:
						U & 1
							? W(p, m, C, x, T, M, F, O, I)
							: U & 6
							? y(p, m, C, x, T, M, F, O, I)
							: (U & 64 || U & 128) && k.process(p, m, C, x, T, M, F, O, I, Ie);
				}
				z != null && T && ii(z, p && p.ref, M, m || p, !m);
			},
			S = (p, m, C, x) => {
				if (p == null) n((m.el = c(m.children)), C, x);
				else {
					const T = (m.el = p.el);
					m.children !== p.children && l(T, m.children);
				}
			},
			j = (p, m, C, x) => {
				p == null ? n((m.el = a(m.children || '')), C, x) : (m.el = p.el);
			},
			D = (p, m, C, x) => {
				[p.el, p.anchor] = _(p.children, m, C, x, p.el, p.anchor);
			},
			b = ({ el: p, anchor: m }, C, x) => {
				let T;
				for (; p && p !== m; ) (T = d(p)), n(p, C, x), (p = T);
				n(m, C, x);
			},
			P = ({ el: p, anchor: m }) => {
				let C;
				for (; p && p !== m; ) (C = d(p)), i(p), (p = C);
				i(m);
			},
			W = (p, m, C, x, T, M, F, O, I) => {
				(F = F || m.type === 'svg'),
					p == null ? A(m, C, x, T, M, F, O, I) : w(p, m, T, M, F, O, I);
			},
			A = (p, m, C, x, T, M, F, O) => {
				let I, k;
				const {
					type: z,
					props: U,
					shapeFlag: H,
					transition: K,
					patchFlag: oe,
					dirs: pe,
				} = p;
				if (p.el && g !== void 0 && oe === -1) I = p.el = g(p.el);
				else {
					if (
						((I = p.el = s(p.type, M, U && U.is, U)),
						H & 8
							? u(I, p.children)
							: H & 16 &&
							  B(p.children, I, null, x, T, M && z !== 'foreignObject', F, O),
						pe && wt(p, null, x, 'created'),
						U)
					) {
						for (const ve in U)
							ve !== 'value' &&
								!Zr(ve) &&
								o(I, ve, null, U[ve], M, p.children, x, T, ie);
						'value' in U && o(I, 'value', null, U.value),
							(k = U.onVnodeBeforeMount) && ct(k, x, p);
					}
					E(I, p, p.scopeId, F, x);
				}
				pe && wt(p, null, x, 'beforeMount');
				const he = (!T || (T && !T.pendingBranch)) && K && !K.persisted;
				he && K.beforeEnter(I),
					n(I, m, C),
					((k = U && U.onVnodeMounted) || he || pe) &&
						$e(() => {
							k && ct(k, x, p),
								he && K.enter(I),
								pe && wt(p, null, x, 'mounted');
						}, T);
			},
			E = (p, m, C, x, T) => {
				if ((C && h(p, C), x)) for (let M = 0; M < x.length; M++) h(p, x[M]);
				if (T) {
					let M = T.subTree;
					if (m === M) {
						const F = T.vnode;
						E(p, F, F.scopeId, F.slotScopeIds, T.parent);
					}
				}
			},
			B = (p, m, C, x, T, M, F, O, I = 0) => {
				for (let k = I; k < p.length; k++) {
					const z = (p[k] = O ? kt(p[k]) : ut(p[k]));
					R(null, z, m, C, x, T, M, F, O);
				}
			},
			w = (p, m, C, x, T, M, F) => {
				const O = (m.el = p.el);
				let { patchFlag: I, dynamicChildren: k, dirs: z } = m;
				I |= p.patchFlag & 16;
				const U = p.props || me,
					H = m.props || me;
				let K;
				C && jt(C, !1),
					(K = H.onVnodeBeforeUpdate) && ct(K, C, m, p),
					z && wt(m, p, C, 'beforeUpdate'),
					C && jt(C, !0);
				const oe = T && m.type !== 'foreignObject';
				if (
					(k
						? te(p.dynamicChildren, k, O, C, x, oe, M)
						: F || Z(p, m, O, null, C, x, oe, M, !1),
					I > 0)
				) {
					if (I & 16) ge(O, m, U, H, C, x, T);
					else if (
						(I & 2 && U.class !== H.class && o(O, 'class', null, H.class, T),
						I & 4 && o(O, 'style', U.style, H.style, T),
						I & 8)
					) {
						const pe = m.dynamicProps;
						for (let he = 0; he < pe.length; he++) {
							const ve = pe[he],
								Ze = U[ve],
								Zt = H[ve];
							(Zt !== Ze || ve === 'value') &&
								o(O, ve, Ze, Zt, T, p.children, C, x, ie);
						}
					}
					I & 1 && p.children !== m.children && u(O, m.children);
				} else !F && k == null && ge(O, m, U, H, C, x, T);
				((K = H.onVnodeUpdated) || z) &&
					$e(() => {
						K && ct(K, C, m, p), z && wt(m, p, C, 'updated');
					}, x);
			},
			te = (p, m, C, x, T, M, F) => {
				for (let O = 0; O < m.length; O++) {
					const I = p[O],
						k = m[O],
						z =
							I.el && (I.type === xe || !$t(I, k) || I.shapeFlag & 70)
								? f(I.el)
								: C;
					R(I, k, z, null, x, T, M, F, !0);
				}
			},
			ge = (p, m, C, x, T, M, F) => {
				if (C !== x) {
					for (const O in x) {
						if (Zr(O)) continue;
						const I = x[O],
							k = C[O];
						I !== k && O !== 'value' && o(p, O, k, I, F, m.children, T, M, ie);
					}
					if (C !== me)
						for (const O in C)
							!Zr(O) &&
								!(O in x) &&
								o(p, O, C[O], null, F, m.children, T, M, ie);
					'value' in x && o(p, 'value', C.value, x.value);
				}
			},
			Q = (p, m, C, x, T, M, F, O, I) => {
				const k = (m.el = p ? p.el : c('')),
					z = (m.anchor = p ? p.anchor : c(''));
				let { patchFlag: U, dynamicChildren: H, slotScopeIds: K } = m;
				K && (O = O ? O.concat(K) : K),
					p == null
						? (n(k, C, x), n(z, C, x), B(m.children, C, z, T, M, F, O, I))
						: U > 0 && U & 64 && H && p.dynamicChildren
						? (te(p.dynamicChildren, H, C, T, M, F, O),
						  (m.key != null || (T && m === T.subTree)) && sa(p, m, !0))
						: Z(p, m, C, z, T, M, F, O, I);
			},
			y = (p, m, C, x, T, M, F, O, I) => {
				(m.slotScopeIds = O),
					p == null
						? m.shapeFlag & 512
							? T.ctx.activate(m, C, x, F, I)
							: v(m, C, x, T, M, F, I)
						: G(p, m, I);
			},
			v = (p, m, C, x, T, M, F) => {
				const O = (p.component = yu(p, x, T));
				if ((kn(p) && (O.ctx.renderer = Ie), _u(O), O.asyncDep)) {
					if ((T && T.registerDep(O, N), !p.el)) {
						const I = (O.subTree = ue(Xe));
						j(null, I, m, C);
					}
					return;
				}
				N(O, p, m, C, T, M, F);
			},
			G = (p, m, C) => {
				const x = (m.component = p.component);
				if (kl(p, m, C))
					if (x.asyncDep && !x.asyncResolved) {
						$(x, m, C);
						return;
					} else (x.next = m), bl(x.update), x.update();
				else (m.el = p.el), (x.vnode = m);
			},
			N = (p, m, C, x, T, M, F) => {
				const O = () => {
						if (p.isMounted) {
							let { next: z, bu: U, u: H, parent: K, vnode: oe } = p,
								pe = z,
								he;
							jt(p, !1),
								z ? ((z.el = oe.el), $(p, z, F)) : (z = oe),
								U && Fn(U),
								(he = z.props && z.props.onVnodeBeforeUpdate) &&
									ct(he, K, z, oe),
								jt(p, !0);
							const ve = Bn(p),
								Ze = p.subTree;
							(p.subTree = ve),
								R(Ze, ve, f(Ze.el), ot(Ze), p, T, M),
								(z.el = ve.el),
								pe === null && El(p, ve.el),
								H && $e(H, T),
								(he = z.props && z.props.onVnodeUpdated) &&
									$e(() => ct(he, K, z, oe), T);
						} else {
							let z;
							const { el: U, props: H } = m,
								{ bm: K, m: oe, parent: pe } = p,
								he = Rr(m);
							if (
								(jt(p, !1),
								K && Fn(K),
								!he && (z = H && H.onVnodeBeforeMount) && ct(z, pe, m),
								jt(p, !0),
								U && Tt)
							) {
								const ve = () => {
									(p.subTree = Bn(p)), Tt(U, p.subTree, p, T, null);
								};
								he
									? m.type.__asyncLoader().then(() => !p.isUnmounted && ve())
									: ve();
							} else {
								const ve = (p.subTree = Bn(p));
								R(null, ve, C, x, p, T, M), (m.el = ve.el);
							}
							if ((oe && $e(oe, T), !he && (z = H && H.onVnodeMounted))) {
								const ve = m;
								$e(() => ct(z, pe, ve), T);
							}
							(m.shapeFlag & 256 ||
								(pe && Rr(pe.vnode) && pe.vnode.shapeFlag & 256)) &&
								p.a &&
								$e(p.a, T),
								(p.isMounted = !0),
								(m = C = x = null);
						}
					},
					I = (p.effect = new Oi(O, () => Bs(k), p.scope)),
					k = (p.update = () => I.run());
				(k.id = p.uid), jt(p, !0), k();
			},
			$ = (p, m, C) => {
				m.component = p;
				const x = p.vnode.props;
				(p.vnode = m),
					(p.next = null),
					ru(p, m.props, x, C),
					ou(p, m.children, C),
					pr(),
					Cn(void 0, p.update),
					hr();
			},
			Z = (p, m, C, x, T, M, F, O, I = !1) => {
				const k = p && p.children,
					z = p ? p.shapeFlag : 0,
					U = m.children,
					{ patchFlag: H, shapeFlag: K } = m;
				if (H > 0) {
					if (H & 128) {
						ne(k, U, C, x, T, M, F, O, I);
						return;
					} else if (H & 256) {
						ee(k, U, C, x, T, M, F, O, I);
						return;
					}
				}
				K & 8
					? (z & 16 && ie(k, T, M), U !== k && u(C, U))
					: z & 16
					? K & 16
						? ne(k, U, C, x, T, M, F, O, I)
						: ie(k, T, M, !0)
					: (z & 8 && u(C, ''), K & 16 && B(U, C, x, T, M, F, O, I));
			},
			ee = (p, m, C, x, T, M, F, O, I) => {
				(p = p || nr), (m = m || nr);
				const k = p.length,
					z = m.length,
					U = Math.min(k, z);
				let H;
				for (H = 0; H < U; H++) {
					const K = (m[H] = I ? kt(m[H]) : ut(m[H]));
					R(p[H], K, C, null, T, M, F, O, I);
				}
				k > z ? ie(p, T, M, !0, !1, U) : B(m, C, x, T, M, F, O, I, U);
			},
			ne = (p, m, C, x, T, M, F, O, I) => {
				let k = 0;
				const z = m.length;
				let U = p.length - 1,
					H = z - 1;
				for (; k <= U && k <= H; ) {
					const K = p[k],
						oe = (m[k] = I ? kt(m[k]) : ut(m[k]));
					if ($t(K, oe)) R(K, oe, C, null, T, M, F, O, I);
					else break;
					k++;
				}
				for (; k <= U && k <= H; ) {
					const K = p[U],
						oe = (m[H] = I ? kt(m[H]) : ut(m[H]));
					if ($t(K, oe)) R(K, oe, C, null, T, M, F, O, I);
					else break;
					U--, H--;
				}
				if (k > U) {
					if (k <= H) {
						const K = H + 1,
							oe = K < z ? m[K].el : x;
						for (; k <= H; )
							R(null, (m[k] = I ? kt(m[k]) : ut(m[k])), C, oe, T, M, F, O, I),
								k++;
					}
				} else if (k > H) for (; k <= U; ) Se(p[k], T, M, !0), k++;
				else {
					const K = k,
						oe = k,
						pe = new Map();
					for (k = oe; k <= H; k++) {
						const Ue = (m[k] = I ? kt(m[k]) : ut(m[k]));
						Ue.key != null && pe.set(Ue.key, k);
					}
					let he,
						ve = 0;
					const Ze = H - oe + 1;
					let Zt = !1,
						Yi = 0;
					const vr = new Array(Ze);
					for (k = 0; k < Ze; k++) vr[k] = 0;
					for (k = K; k <= U; k++) {
						const Ue = p[k];
						if (ve >= Ze) {
							Se(Ue, T, M, !0);
							continue;
						}
						let at;
						if (Ue.key != null) at = pe.get(Ue.key);
						else
							for (he = oe; he <= H; he++)
								if (vr[he - oe] === 0 && $t(Ue, m[he])) {
									at = he;
									break;
								}
						at === void 0
							? Se(Ue, T, M, !0)
							: ((vr[at - oe] = k + 1),
							  at >= Yi ? (Yi = at) : (Zt = !0),
							  R(Ue, m[at], C, null, T, M, F, O, I),
							  ve++);
					}
					const Xi = Zt ? uu(vr) : nr;
					for (he = Xi.length - 1, k = Ze - 1; k >= 0; k--) {
						const Ue = oe + k,
							at = m[Ue],
							Zi = Ue + 1 < z ? m[Ue + 1].el : x;
						vr[k] === 0
							? R(null, at, C, Zi, T, M, F, O, I)
							: Zt && (he < 0 || k !== Xi[he] ? ce(at, C, Zi, 2) : he--);
					}
				}
			},
			ce = (p, m, C, x, T = null) => {
				const { el: M, type: F, transition: O, children: I, shapeFlag: k } = p;
				if (k & 6) {
					ce(p.component.subTree, m, C, x);
					return;
				}
				if (k & 128) {
					p.suspense.move(m, C, x);
					return;
				}
				if (k & 64) {
					F.move(p, m, C, Ie);
					return;
				}
				if (F === xe) {
					n(M, m, C);
					for (let U = 0; U < I.length; U++) ce(I[U], m, C, x);
					n(p.anchor, m, C);
					return;
				}
				if (F === $n) {
					b(p, m, C);
					return;
				}
				if (x !== 2 && k & 1 && O)
					if (x === 0) O.beforeEnter(M), n(M, m, C), $e(() => O.enter(M), T);
					else {
						const { leave: U, delayLeave: H, afterLeave: K } = O,
							oe = () => n(M, m, C),
							pe = () => {
								U(M, () => {
									oe(), K && K();
								});
							};
						H ? H(M, oe, pe) : pe();
					}
				else n(M, m, C);
			},
			Se = (p, m, C, x = !1, T = !1) => {
				const {
					type: M,
					props: F,
					ref: O,
					children: I,
					dynamicChildren: k,
					shapeFlag: z,
					patchFlag: U,
					dirs: H,
				} = p;
				if ((O != null && ii(O, null, C, p, !0), z & 256)) {
					m.ctx.deactivate(p);
					return;
				}
				const K = z & 1 && H,
					oe = !Rr(p);
				let pe;
				if ((oe && (pe = F && F.onVnodeBeforeUnmount) && ct(pe, m, p), z & 6))
					Te(p.component, C, x);
				else {
					if (z & 128) {
						p.suspense.unmount(C, x);
						return;
					}
					K && wt(p, null, m, 'beforeUnmount'),
						z & 64
							? p.type.remove(p, m, C, T, Ie, x)
							: k && (M !== xe || (U > 0 && U & 64))
							? ie(k, m, C, !1, !0)
							: ((M === xe && U & 384) || (!T && z & 16)) && ie(I, m, C),
						x && le(p);
				}
				((oe && (pe = F && F.onVnodeUnmounted)) || K) &&
					$e(() => {
						pe && ct(pe, m, p), K && wt(p, null, m, 'unmounted');
					}, C);
			},
			le = (p) => {
				const { type: m, el: C, anchor: x, transition: T } = p;
				if (m === xe) {
					Je(C, x);
					return;
				}
				if (m === $n) {
					P(p);
					return;
				}
				const M = () => {
					i(C), T && !T.persisted && T.afterLeave && T.afterLeave();
				};
				if (p.shapeFlag & 1 && T && !T.persisted) {
					const { leave: F, delayLeave: O } = T,
						I = () => F(C, M);
					O ? O(p.el, M, I) : I();
				} else M();
			},
			Je = (p, m) => {
				let C;
				for (; p !== m; ) (C = d(p)), i(p), (p = C);
				i(m);
			},
			Te = (p, m, C) => {
				const { bum: x, scope: T, update: M, subTree: F, um: O } = p;
				x && Fn(x),
					T.stop(),
					M && ((M.active = !1), Se(F, p, m, C)),
					O && $e(O, m),
					$e(() => {
						p.isUnmounted = !0;
					}, m),
					m &&
						m.pendingBranch &&
						!m.isUnmounted &&
						p.asyncDep &&
						!p.asyncResolved &&
						p.suspenseId === m.pendingId &&
						(m.deps--, m.deps === 0 && m.resolve());
			},
			ie = (p, m, C, x = !1, T = !1, M = 0) => {
				for (let F = M; F < p.length; F++) Se(p[F], m, C, x, T);
			},
			ot = (p) =>
				p.shapeFlag & 6
					? ot(p.component.subTree)
					: p.shapeFlag & 128
					? p.suspense.next()
					: d(p.anchor || p.el),
			be = (p, m, C) => {
				p == null
					? m._vnode && Se(m._vnode, null, null, !0)
					: R(m._vnode || null, p, m, null, null, null, C),
					Ns(),
					(m._vnode = p);
			},
			Ie = {
				p: R,
				um: Se,
				m: ce,
				r: le,
				mt: v,
				mc: B,
				pc: Z,
				pbc: te,
				n: ot,
				o: e,
			};
		let st, Tt;
		return (
			t && ([st, Tt] = t(Ie)),
			{ render: be, hydrate: st, createApp: au(be, st) }
		);
	}
	function jt({ effect: e, update: t }, r) {
		e.allowRecurse = t.allowRecurse = r;
	}
	function sa(e, t, r = !1) {
		const n = e.children,
			i = t.children;
		if (q(n) && q(i))
			for (let o = 0; o < n.length; o++) {
				const s = n[o];
				let c = i[o];
				c.shapeFlag & 1 &&
					!c.dynamicChildren &&
					((c.patchFlag <= 0 || c.patchFlag === 32) &&
						((c = i[o] = kt(i[o])), (c.el = s.el)),
					r || sa(s, c));
			}
	}
	function uu(e) {
		const t = e.slice(),
			r = [0];
		let n, i, o, s, c;
		const a = e.length;
		for (n = 0; n < a; n++) {
			const l = e[n];
			if (l !== 0) {
				if (((i = r[r.length - 1]), e[i] < l)) {
					(t[n] = i), r.push(n);
					continue;
				}
				for (o = 0, s = r.length - 1; o < s; )
					(c = (o + s) >> 1), e[r[c]] < l ? (o = c + 1) : (s = c);
				l < e[r[o]] && (o > 0 && (t[n] = r[o - 1]), (r[o] = n));
			}
		}
		for (o = r.length, s = r[o - 1]; o-- > 0; ) (r[o] = s), (s = t[s]);
		return r;
	}
	const fu = (e) => e.__isTeleport,
		xe = Symbol(void 0),
		Ni = Symbol(void 0),
		Xe = Symbol(void 0),
		$n = Symbol(void 0),
		Or = [];
	let rt = null;
	function de(e = !1) {
		Or.push((rt = e ? null : []));
	}
	function du() {
		Or.pop(), (rt = Or[Or.length - 1] || null);
	}
	let Fr = 1;
	function _o(e) {
		Fr += e;
	}
	function aa(e) {
		return (
			(e.dynamicChildren = Fr > 0 ? rt || nr : null),
			du(),
			Fr > 0 && rt && rt.push(e),
			e
		);
	}
	function ye(e, t, r, n, i, o) {
		return aa(J(e, t, r, n, i, o, !0));
	}
	function Br(e, t, r, n, i) {
		return aa(ue(e, t, r, n, i, !0));
	}
	function ca(e) {
		return e ? e.__v_isVNode === !0 : !1;
	}
	function $t(e, t) {
		return e.type === t.type && e.key === t.key;
	}
	const On = '__vInternal',
		la = ({ key: e }) => (e != null ? e : null),
		en = ({ ref: e, ref_key: t, ref_for: r }) =>
			e != null
				? Ee(e) || _e(e) || X(e)
					? { i: we, r: e, k: t, f: !!r }
					: e
				: null;
	function J(
		e,
		t = null,
		r = null,
		n = 0,
		i = null,
		o = e === xe ? 0 : 1,
		s = !1,
		c = !1
	) {
		const a = {
			__v_isVNode: !0,
			__v_skip: !0,
			type: e,
			props: t,
			key: t && la(t),
			ref: t && en(t),
			scopeId: Tn,
			slotScopeIds: null,
			children: r,
			component: null,
			suspense: null,
			ssContent: null,
			ssFallback: null,
			dirs: null,
			transition: null,
			el: null,
			anchor: null,
			target: null,
			targetAnchor: null,
			staticCount: 0,
			shapeFlag: o,
			patchFlag: n,
			dynamicProps: i,
			dynamicChildren: null,
			appContext: null,
		};
		return (
			c
				? (Ui(a, r), o & 128 && e.normalize(a))
				: r && (a.shapeFlag |= Ee(r) ? 8 : 16),
			Fr > 0 &&
				!s &&
				rt &&
				(a.patchFlag > 0 || o & 6) &&
				a.patchFlag !== 32 &&
				rt.push(a),
			a
		);
	}
	const ue = pu;
	function pu(e, t = null, r = null, n = 0, i = null, o = !1) {
		if (((!e || e === Jl) && (e = Xe), ca(e))) {
			const c = It(e, t, !0);
			return (
				r && Ui(c, r),
				Fr > 0 &&
					!o &&
					rt &&
					(c.shapeFlag & 6 ? (rt[rt.indexOf(e)] = c) : rt.push(c)),
				(c.patchFlag |= -2),
				c
			);
		}
		if ((xu(e) && (e = e.__vccOpts), t)) {
			t = hu(t);
			let { class: c, style: a } = t;
			c && !Ee(c) && (t.class = yt(c)),
				Re(a) && (Ds(a) && !q(a) && (a = je({}, a)), (t.style = sr(a)));
		}
		const s = Ee(e) ? 1 : Rl(e) ? 128 : fu(e) ? 64 : Re(e) ? 4 : X(e) ? 2 : 0;
		return J(e, t, r, n, i, s, o, !0);
	}
	function hu(e) {
		return e ? (Ds(e) || On in e ? je({}, e) : e) : null;
	}
	function It(e, t, r = !1) {
		const { props: n, ref: i, patchFlag: o, children: s } = e,
			c = t ? mu(n || {}, t) : n;
		return {
			__v_isVNode: !0,
			__v_skip: !0,
			type: e.type,
			props: c,
			key: c && la(c),
			ref:
				t && t.ref
					? r && i
						? q(i)
							? i.concat(en(t))
							: [i, en(t)]
						: en(t)
					: i,
			scopeId: e.scopeId,
			slotScopeIds: e.slotScopeIds,
			children: s,
			target: e.target,
			targetAnchor: e.targetAnchor,
			staticCount: e.staticCount,
			shapeFlag: e.shapeFlag,
			patchFlag: t && e.type !== xe ? (o === -1 ? 16 : o | 16) : o,
			dynamicProps: e.dynamicProps,
			dynamicChildren: e.dynamicChildren,
			appContext: e.appContext,
			dirs: e.dirs,
			transition: e.transition,
			component: e.component,
			suspense: e.suspense,
			ssContent: e.ssContent && It(e.ssContent),
			ssFallback: e.ssFallback && It(e.ssFallback),
			el: e.el,
			anchor: e.anchor,
		};
	}
	function Ct(e = ' ', t = 0) {
		return ue(Ni, null, e, t);
	}
	function bo(e = '', t = !1) {
		return t ? (de(), Br(Xe, null, e)) : ue(Xe, null, e);
	}
	function ut(e) {
		return e == null || typeof e == 'boolean'
			? ue(Xe)
			: q(e)
			? ue(xe, null, e.slice())
			: typeof e == 'object'
			? kt(e)
			: ue(Ni, null, String(e));
	}
	function kt(e) {
		return e.el === null || e.memo ? e : It(e);
	}
	function Ui(e, t) {
		let r = 0;
		const { shapeFlag: n } = e;
		if (t == null) t = null;
		else if (q(t)) r = 16;
		else if (typeof t == 'object')
			if (n & 65) {
				const i = t.default;
				i && (i._c && (i._d = !1), Ui(e, i()), i._c && (i._d = !0));
				return;
			} else {
				r = 32;
				const i = t._;
				!i && !(On in t)
					? (t._ctx = we)
					: i === 3 &&
					  we &&
					  (we.slots._ === 1 ? (t._ = 1) : ((t._ = 2), (e.patchFlag |= 1024)));
			}
		else
			X(t)
				? ((t = { default: t, _ctx: we }), (r = 32))
				: ((t = String(t)), n & 64 ? ((r = 16), (t = [Ct(t)])) : (r = 8));
		(e.children = t), (e.shapeFlag |= r);
	}
	function mu(...e) {
		const t = {};
		for (let r = 0; r < e.length; r++) {
			const n = e[r];
			for (const i in n)
				if (i === 'class')
					t.class !== n.class && (t.class = yt([t.class, n.class]));
				else if (i === 'style') t.style = sr([t.style, n.style]);
				else if (mn(i)) {
					const o = t[i],
						s = n[i];
					s &&
						o !== s &&
						!(q(o) && o.includes(s)) &&
						(t[i] = o ? [].concat(o, s) : s);
				} else i !== '' && (t[i] = n[i]);
		}
		return t;
	}
	function ct(e, t, r, n = null) {
		Ye(e, t, 7, [r, n]);
	}
	const gu = oa();
	let vu = 0;
	function yu(e, t, r) {
		const n = e.type,
			i = (t ? t.appContext : e.appContext) || gu,
			o = {
				uid: vu++,
				vnode: e,
				type: n,
				parent: t,
				appContext: i,
				root: null,
				next: null,
				subTree: null,
				effect: null,
				update: null,
				scope: new _s(!0),
				render: null,
				proxy: null,
				exposed: null,
				exposeProxy: null,
				withProxy: null,
				provides: t ? t.provides : Object.create(i.provides),
				accessCache: null,
				renderCache: [],
				components: null,
				directives: null,
				propsOptions: ta(n, i),
				emitsOptions: Gs(n, i),
				emit: null,
				emitted: null,
				propsDefaults: me,
				inheritAttrs: n.inheritAttrs,
				ctx: me,
				data: me,
				props: me,
				attrs: me,
				slots: me,
				refs: me,
				setupState: me,
				setupContext: null,
				suspense: r,
				suspenseId: r ? r.pendingId : 0,
				asyncDep: null,
				asyncResolved: !1,
				isMounted: !1,
				isUnmounted: !1,
				isDeactivated: !1,
				bc: null,
				c: null,
				bm: null,
				m: null,
				bu: null,
				u: null,
				um: null,
				bum: null,
				da: null,
				a: null,
				rtg: null,
				rtc: null,
				ec: null,
				sp: null,
			};
		return (
			(o.ctx = { _: o }),
			(o.root = t ? t.root : o),
			(o.emit = Tl.bind(null, o)),
			e.ce && e.ce(o),
			o
		);
	}
	let Pe = null;
	const Mn = () => Pe || we,
		lr = (e) => {
			(Pe = e), e.scope.on();
		},
		Vt = () => {
			Pe && Pe.scope.off(), (Pe = null);
		};
	function ua(e) {
		return e.vnode.shapeFlag & 4;
	}
	let Lr = !1;
	function _u(e, t = !1) {
		Lr = t;
		const { props: r, children: n } = e.vnode,
			i = ua(e);
		tu(e, r, i, t), iu(e, n);
		const o = i ? bu(e, t) : void 0;
		return (Lr = !1), o;
	}
	function bu(e, t) {
		const r = e.type;
		(e.accessCache = Object.create(null)), (e.proxy = cr(new Proxy(e.ctx, ql)));
		const { setup: n } = r;
		if (n) {
			const i = (e.setupContext = n.length > 1 ? Su(e) : null);
			lr(e), pr();
			const o = Mt(n, e, 0, [e.props, i]);
			if ((hr(), Vt(), gs(o))) {
				if ((o.then(Vt, Vt), t))
					return o
						.then((s) => {
							Co(e, s, t);
						})
						.catch((s) => {
							bn(s, e, 0);
						});
				e.asyncDep = o;
			} else Co(e, o, t);
		} else fa(e, t);
	}
	function Co(e, t, r) {
		X(t)
			? e.type.__ssrInlineRender
				? (e.ssrRender = t)
				: (e.render = t)
			: Re(t) && (e.setupState = js(t)),
			fa(e, r);
	}
	let So;
	function fa(e, t, r) {
		const n = e.type;
		if (!e.render) {
			if (!t && So && !n.render) {
				const i = n.template;
				if (i) {
					const { isCustomElement: o, compilerOptions: s } =
							e.appContext.config,
						{ delimiters: c, compilerOptions: a } = n,
						l = je(je({ isCustomElement: o, delimiters: c }, s), a);
					n.render = So(i, l);
				}
			}
			e.render = n.render || nt;
		}
		lr(e), pr(), Yl(e), hr(), Vt();
	}
	function Cu(e) {
		return new Proxy(e.attrs, {
			get(t, r) {
				return Ve(e, 'get', '$attrs'), t[r];
			},
		});
	}
	function Su(e) {
		const t = (n) => {
			e.exposed = n || {};
		};
		let r;
		return {
			get attrs() {
				return r || (r = Cu(e));
			},
			slots: e.slots,
			emit: e.emit,
			expose: t,
		};
	}
	function Dn(e) {
		if (e.exposed)
			return (
				e.exposeProxy ||
				(e.exposeProxy = new Proxy(js(cr(e.exposed)), {
					get(t, r) {
						if (r in t) return t[r];
						if (r in ln) return ln[r](e);
					},
				}))
			);
	}
	function Tu(e, t = !0) {
		return X(e) ? e.displayName || e.name : e.name || (t && e.__name);
	}
	function xu(e) {
		return X(e) && '__vccOpts' in e;
	}
	const ke = (e, t) => vl(e, t, Lr),
		Pu = '3.2.37',
		ku = 'http://www.w3.org/2000/svg',
		Nt = typeof document < 'u' ? document : null,
		To = Nt && Nt.createElement('template'),
		Eu = {
			insert: (e, t, r) => {
				t.insertBefore(e, r || null);
			},
			remove: (e) => {
				const t = e.parentNode;
				t && t.removeChild(e);
			},
			createElement: (e, t, r, n) => {
				const i = t
					? Nt.createElementNS(ku, e)
					: Nt.createElement(e, r ? { is: r } : void 0);
				return (
					e === 'select' &&
						n &&
						n.multiple != null &&
						i.setAttribute('multiple', n.multiple),
					i
				);
			},
			createText: (e) => Nt.createTextNode(e),
			createComment: (e) => Nt.createComment(e),
			setText: (e, t) => {
				e.nodeValue = t;
			},
			setElementText: (e, t) => {
				e.textContent = t;
			},
			parentNode: (e) => e.parentNode,
			nextSibling: (e) => e.nextSibling,
			querySelector: (e) => Nt.querySelector(e),
			setScopeId(e, t) {
				e.setAttribute(t, '');
			},
			cloneNode(e) {
				const t = e.cloneNode(!0);
				return '_value' in e && (t._value = e._value), t;
			},
			insertStaticContent(e, t, r, n, i, o) {
				const s = r ? r.previousSibling : t.lastChild;
				if (i && (i === o || i.nextSibling))
					for (
						;
						t.insertBefore(i.cloneNode(!0), r),
							!(i === o || !(i = i.nextSibling));

					);
				else {
					To.innerHTML = n ? `<svg>${e}</svg>` : e;
					const c = To.content;
					if (n) {
						const a = c.firstChild;
						for (; a.firstChild; ) c.appendChild(a.firstChild);
						c.removeChild(a);
					}
					t.insertBefore(c, r);
				}
				return [
					s ? s.nextSibling : t.firstChild,
					r ? r.previousSibling : t.lastChild,
				];
			},
		};
	function Ru(e, t, r) {
		const n = e._vtc;
		n && (t = (t ? [t, ...n] : [...n]).join(' ')),
			t == null
				? e.removeAttribute('class')
				: r
				? e.setAttribute('class', t)
				: (e.className = t);
	}
	function Ou(e, t, r) {
		const n = e.style,
			i = Ee(r);
		if (r && !i) {
			for (const o in r) oi(n, o, r[o]);
			if (t && !Ee(t)) for (const o in t) r[o] == null && oi(n, o, '');
		} else {
			const o = n.display;
			i ? t !== r && (n.cssText = r) : t && e.removeAttribute('style'),
				'_vod' in e && (n.display = o);
		}
	}
	const xo = /\s*!important$/;
	function oi(e, t, r) {
		if (q(r)) r.forEach((n) => oi(e, t, n));
		else if ((r == null && (r = ''), t.startsWith('--'))) e.setProperty(t, r);
		else {
			const n = Mu(e, t);
			xo.test(r)
				? e.setProperty(dr(n), r.replace(xo, ''), 'important')
				: (e[n] = r);
		}
	}
	const Po = ['Webkit', 'Moz', 'ms'],
		Nn = {};
	function Mu(e, t) {
		const r = Nn[t];
		if (r) return r;
		let n = ft(t);
		if (n !== 'filter' && n in e) return (Nn[t] = n);
		n = yn(n);
		for (let i = 0; i < Po.length; i++) {
			const o = Po[i] + n;
			if (o in e) return (Nn[t] = o);
		}
		return t;
	}
	const ko = 'http://www.w3.org/1999/xlink';
	function Du(e, t, r, n, i) {
		if (n && t.startsWith('xlink:'))
			r == null
				? e.removeAttributeNS(ko, t.slice(6, t.length))
				: e.setAttributeNS(ko, t, r);
		else {
			const o = Tc(t);
			r == null || (o && !ps(r))
				? e.removeAttribute(t)
				: e.setAttribute(t, o ? '' : r);
		}
	}
	function Iu(e, t, r, n, i, o, s) {
		if (t === 'innerHTML' || t === 'textContent') {
			n && s(n, i, o), (e[t] = r == null ? '' : r);
			return;
		}
		if (t === 'value' && e.tagName !== 'PROGRESS' && !e.tagName.includes('-')) {
			e._value = r;
			const a = r == null ? '' : r;
			(e.value !== a || e.tagName === 'OPTION') && (e.value = a),
				r == null && e.removeAttribute(t);
			return;
		}
		let c = !1;
		if (r === '' || r == null) {
			const a = typeof e[t];
			a === 'boolean'
				? (r = ps(r))
				: r == null && a === 'string'
				? ((r = ''), (c = !0))
				: a === 'number' && ((r = 0), (c = !0));
		}
		try {
			e[t] = r;
		} catch {}
		c && e.removeAttribute(t);
	}
	const [da, Au] = (() => {
		let e = Date.now,
			t = !1;
		if (typeof window < 'u') {
			Date.now() > document.createEvent('Event').timeStamp &&
				(e = performance.now.bind(performance));
			const r = navigator.userAgent.match(/firefox\/(\d+)/i);
			t = !!(r && Number(r[1]) <= 53);
		}
		return [e, t];
	})();
	let si = 0;
	const wu = Promise.resolve(),
		ju = () => {
			si = 0;
		},
		Fu = () => si || (wu.then(ju), (si = da()));
	function Bu(e, t, r, n) {
		e.addEventListener(t, r, n);
	}
	function Lu(e, t, r, n) {
		e.removeEventListener(t, r, n);
	}
	function $u(e, t, r, n, i = null) {
		const o = e._vei || (e._vei = {}),
			s = o[t];
		if (n && s) s.value = n;
		else {
			const [c, a] = Nu(t);
			if (n) {
				const l = (o[t] = Uu(n, i));
				Bu(e, c, l, a);
			} else s && (Lu(e, c, s, a), (o[t] = void 0));
		}
	}
	const Eo = /(?:Once|Passive|Capture)$/;
	function Nu(e) {
		let t;
		if (Eo.test(e)) {
			t = {};
			let r;
			for (; (r = e.match(Eo)); )
				(e = e.slice(0, e.length - r[0].length)), (t[r[0].toLowerCase()] = !0);
		}
		return [dr(e.slice(2)), t];
	}
	function Uu(e, t) {
		const r = (n) => {
			const i = n.timeStamp || da();
			(Au || i >= r.attached - 1) && Ye(Gu(n, r.value), t, 5, [n]);
		};
		return (r.value = e), (r.attached = Fu()), r;
	}
	function Gu(e, t) {
		if (q(t)) {
			const r = e.stopImmediatePropagation;
			return (
				(e.stopImmediatePropagation = () => {
					r.call(e), (e._stopped = !0);
				}),
				t.map((n) => (i) => !i._stopped && n && n(i))
			);
		} else return t;
	}
	const Ro = /^on[a-z]/,
		zu = (e, t, r, n, i = !1, o, s, c, a) => {
			t === 'class'
				? Ru(e, n, i)
				: t === 'style'
				? Ou(e, r, n)
				: mn(t)
				? xi(t) || $u(e, t, r, n, s)
				: (
						t[0] === '.'
							? ((t = t.slice(1)), !0)
							: t[0] === '^'
							? ((t = t.slice(1)), !1)
							: Wu(e, t, n, i)
				  )
				? Iu(e, t, n, o, s, c, a)
				: (t === 'true-value'
						? (e._trueValue = n)
						: t === 'false-value' && (e._falseValue = n),
				  Du(e, t, n, i));
		};
	function Wu(e, t, r, n) {
		return n
			? !!(
					t === 'innerHTML' ||
					t === 'textContent' ||
					(t in e && Ro.test(t) && X(r))
			  )
			: t === 'spellcheck' ||
			  t === 'draggable' ||
			  t === 'translate' ||
			  t === 'form' ||
			  (t === 'list' && e.tagName === 'INPUT') ||
			  (t === 'type' && e.tagName === 'TEXTAREA') ||
			  (Ro.test(t) && Ee(r))
			? !1
			: t in e;
	}
	const Hu = {
		name: String,
		type: String,
		css: { type: Boolean, default: !0 },
		duration: [String, Number, Object],
		enterFromClass: String,
		enterActiveClass: String,
		enterToClass: String,
		appearFromClass: String,
		appearActiveClass: String,
		appearToClass: String,
		leaveFromClass: String,
		leaveActiveClass: String,
		leaveToClass: String,
	};
	wl.props;
	const Vu = je({ patchProp: zu }, Eu);
	let Oo;
	function Ju() {
		return Oo || (Oo = cu(Vu));
	}
	const Ku = (...e) => {
		const t = Ju().createApp(...e),
			{ mount: r } = t;
		return (
			(t.mount = (n) => {
				const i = qu(n);
				if (!i) return;
				const o = t._component;
				!X(o) && !o.render && !o.template && (o.template = i.innerHTML),
					(i.innerHTML = '');
				const s = r(i, !1, i instanceof SVGElement);
				return (
					i instanceof Element &&
						(i.removeAttribute('v-cloak'), i.setAttribute('data-v-app', '')),
					s
				);
			}),
			t
		);
	};
	function qu(e) {
		return Ee(e) ? document.querySelector(e) : e;
	}
	const pa = new Set(),
		He = new WeakMap(),
		or = new WeakMap(),
		Kt = new WeakMap(),
		ai = new WeakMap(),
		Yu = new WeakMap(),
		ur = new WeakMap(),
		fn = new WeakMap();
	let At;
	const Gt = '__aa_tgt',
		ci = '__aa_del',
		Xu = (e) => {
			const t = rf(e);
			t && t.forEach((r) => nf(r));
		},
		Zu = (e) => {
			e.forEach((t) => {
				t.target === At && ef(), He.has(t.target) && Yt(t.target);
			});
		};
	function Qu(e) {
		const t = ai.get(e);
		t == null || t.disconnect();
		let r = He.get(e),
			n = 0;
		const i = 5;
		r || ((r = fr(e)), He.set(e, r));
		const { offsetWidth: o, offsetHeight: s } = At,
			a = [
				r.top - i,
				o - (r.left + i + r.width),
				s - (r.top + i + r.height),
				r.left - i,
			]
				.map((u) => `${-1 * Math.floor(u)}px`)
				.join(' '),
			l = new IntersectionObserver(
				() => {
					++n > 1 && Yt(e);
				},
				{ root: At, threshold: 1, rootMargin: a }
			);
		l.observe(e), ai.set(e, l);
	}
	function Yt(e) {
		clearTimeout(fn.get(e));
		const t = In(e),
			r = typeof t == 'function' ? 500 : t.duration;
		fn.set(
			e,
			setTimeout(() => {
				const n = Kt.get(e);
				(!n || n.finished) && (He.set(e, fr(e)), Qu(e));
			}, r)
		);
	}
	function ef() {
		clearTimeout(fn.get(At)),
			fn.set(
				At,
				setTimeout(() => {
					pa.forEach((e) => ga(e, (t) => ha(() => Yt(t))));
				}, 100)
			);
	}
	function tf(e) {
		setTimeout(() => {
			Yu.set(
				e,
				setInterval(() => ha(Yt.bind(null, e)), 2e3)
			);
		}, Math.round(2e3 * Math.random()));
	}
	function ha(e) {
		typeof requestIdleCallback == 'function'
			? requestIdleCallback(() => e())
			: requestAnimationFrame(() => e());
	}
	let li, rr;
	typeof window < 'u' &&
		((At = document.documentElement),
		(li = new MutationObserver(Xu)),
		(rr = new ResizeObserver(Zu)),
		rr.observe(At));
	function rf(e) {
		return e.reduce((t, r) => {
			if (t === !1) return !1;
			if (r.target instanceof Element) {
				if ((Un(r.target), !t.has(r.target))) {
					t.add(r.target);
					for (let n = 0; n < r.target.children.length; n++) {
						const i = r.target.children.item(n);
						if (!!i) {
							if (ci in i) return !1;
							Un(r.target, i), t.add(i);
						}
					}
				}
				if (r.removedNodes.length)
					for (let n = 0; n < r.removedNodes.length; n++) {
						const i = r.removedNodes[n];
						if (ci in i) return !1;
						i instanceof Element &&
							(t.add(i),
							Un(r.target, i),
							or.set(i, [r.previousSibling, r.nextSibling]));
					}
			}
			return t;
		}, new Set());
	}
	function Un(e, t) {
		!t && !(Gt in e)
			? Object.defineProperty(e, Gt, { value: e })
			: t && !(Gt in t) && Object.defineProperty(t, Gt, { value: e });
	}
	function nf(e) {
		var t;
		const r = At.contains(e),
			n = He.has(e);
		r && or.has(e) && or.delete(e),
			Kt.has(e) && ((t = Kt.get(e)) === null || t === void 0 || t.cancel()),
			n && r ? of(e) : n && !r ? af(e) : sf(e);
	}
	function lt(e) {
		return Number(e.replace(/[^0-9.\-]/g, ''));
	}
	function fr(e) {
		const t = e.getBoundingClientRect();
		return {
			top: t.top + window.scrollY,
			left: t.left + window.scrollX,
			width: t.width,
			height: t.height,
		};
	}
	function ma(e, t, r) {
		let n = t.width,
			i = t.height,
			o = r.width,
			s = r.height;
		const c = getComputedStyle(e);
		if (c.getPropertyValue('box-sizing') === 'content-box') {
			const l =
					lt(c.paddingTop) +
					lt(c.paddingBottom) +
					lt(c.borderTopWidth) +
					lt(c.borderBottomWidth),
				u =
					lt(c.paddingLeft) +
					lt(c.paddingRight) +
					lt(c.borderRightWidth) +
					lt(c.borderLeftWidth);
			(n -= u), (o -= u), (i -= l), (s -= l);
		}
		return [n, o, i, s].map(Math.round);
	}
	function In(e) {
		return Gt in e && ur.has(e[Gt])
			? ur.get(e[Gt])
			: { duration: 250, easing: 'ease-in-out' };
	}
	function ga(e, ...t) {
		t.forEach((r) => r(e, ur.has(e)));
		for (let r = 0; r < e.children.length; r++) {
			const n = e.children.item(r);
			n && t.forEach((i) => i(n, ur.has(n)));
		}
	}
	function of(e) {
		const t = He.get(e),
			r = fr(e);
		let n;
		if (!t) return;
		const i = In(e);
		if (typeof i != 'function') {
			const o = t.left - r.left,
				s = t.top - r.top,
				[c, a, l, u] = ma(e, t, r),
				f = { transform: `translate(${o}px, ${s}px)` },
				d = { transform: 'translate(0, 0)' };
			c !== a && ((f.width = `${c}px`), (d.width = `${a}px`)),
				l !== u && ((f.height = `${l}px`), (d.height = `${u}px`)),
				(n = e.animate([f, d], i));
		} else (n = new Animation(i(e, 'remain', t, r))), n.play();
		Kt.set(e, n), He.set(e, r), n.addEventListener('finish', Yt.bind(null, e));
	}
	function sf(e) {
		const t = fr(e);
		He.set(e, t);
		const r = In(e);
		let n;
		typeof r != 'function'
			? (n = e.animate(
					[
						{ transform: 'scale(.98)', opacity: 0 },
						{ transform: 'scale(0.98)', opacity: 0, offset: 0.5 },
						{ transform: 'scale(1)', opacity: 1 },
					],
					{ duration: r.duration * 1.5, easing: 'ease-in' }
			  ))
			: ((n = new Animation(r(e, 'add', t))), n.play()),
			Kt.set(e, n),
			n.addEventListener('finish', Yt.bind(null, e));
	}
	function af(e) {
		if (!or.has(e) || !He.has(e)) return;
		const [t, r] = or.get(e);
		Object.defineProperty(e, ci, { value: !0 }),
			r && r.parentNode && r.parentNode instanceof Element
				? r.parentNode.insertBefore(e, r)
				: t && t.parentNode && t.parentNode.appendChild(e);
		const [n, i, o, s] = cf(e),
			c = In(e),
			a = He.get(e);
		let l;
		Object.assign(e.style, {
			position: 'absolute',
			top: `${n}px`,
			left: `${i}px`,
			width: `${o}px`,
			height: `${s}px`,
			margin: 0,
			pointerEvents: 'none',
			transformOrigin: 'center',
			zIndex: 100,
		}),
			typeof c != 'function'
				? (l = e.animate(
						[
							{ transform: 'scale(1)', opacity: 1 },
							{ transform: 'scale(.98)', opacity: 0 },
						],
						{ duration: c.duration, easing: 'ease-out' }
				  ))
				: ((l = new Animation(c(e, 'remove', a))), l.play()),
			Kt.set(e, l),
			l.addEventListener('finish', () => {
				var u;
				e.remove(),
					He.delete(e),
					or.delete(e),
					Kt.delete(e),
					(u = ai.get(e)) === null || u === void 0 || u.disconnect();
			});
	}
	function cf(e) {
		const t = He.get(e),
			[r, , n] = ma(e, t, fr(e));
		let i = e.parentElement;
		for (
			;
			i &&
			(getComputedStyle(i).position === 'static' ||
				i instanceof HTMLBodyElement);

		)
			i = i.parentElement;
		i || (i = document.body);
		const o = getComputedStyle(i),
			s = He.get(i) || fr(i),
			c = Math.round(t.top - s.top) - lt(o.borderTopWidth),
			a = Math.round(t.left - s.left) - lt(o.borderLeftWidth);
		return [c, a, r, n];
	}
	function lf(e, t = {}) {
		if (li && rr) {
			if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
			getComputedStyle(e).position === 'static' &&
				Object.assign(e.style, { position: 'relative' }),
				ga(e, Yt, tf, (n) => (rr == null ? void 0 : rr.observe(n))),
				typeof t == 'function'
					? ur.set(e, t)
					: ur.set(e, { duration: 250, easing: 'ease-in-out', ...t }),
				li.observe(e, { childList: !0 }),
				pa.add(e);
		}
	}
	const uf = {
			mounted: (e, t) => {
				lf(e, t.value || {});
			},
		},
		ff = {
			install(e) {
				e.directive('auto-animate', uf);
			},
		};
	var df = !1;
	/*!
	 * pinia v2.0.17
	 * (c) 2022 Eduardo San Martin Morote
	 * @license MIT
	 */ let va;
	const An = (e) => (va = e),
		ya = Symbol();
	function ui(e) {
		return (
			e &&
			typeof e == 'object' &&
			Object.prototype.toString.call(e) === '[object Object]' &&
			typeof e.toJSON != 'function'
		);
	}
	var Mr;
	(function (e) {
		(e.direct = 'direct'),
			(e.patchObject = 'patch object'),
			(e.patchFunction = 'patch function');
	})(Mr || (Mr = {}));
	function pf() {
		const e = bs(!0),
			t = e.run(() => fe({}));
		let r = [],
			n = [];
		const i = cr({
			install(o) {
				An(i),
					(i._a = o),
					o.provide(ya, i),
					(o.config.globalProperties.$pinia = i),
					n.forEach((s) => r.push(s)),
					(n = []);
			},
			use(o) {
				return !this._a && !df ? n.push(o) : r.push(o), this;
			},
			_p: r,
			_a: null,
			_e: e,
			_s: new Map(),
			state: t,
		});
		return i;
	}
	const _a = () => {};
	function Mo(e, t, r, n = _a) {
		e.push(t);
		const i = () => {
			const o = e.indexOf(t);
			o > -1 && (e.splice(o, 1), n());
		};
		return !r && Mn() && Li(i), i;
	}
	function Qt(e, ...t) {
		e.slice().forEach((r) => {
			r(...t);
		});
	}
	function fi(e, t) {
		for (const r in t) {
			if (!t.hasOwnProperty(r)) continue;
			const n = t[r],
				i = e[r];
			ui(i) && ui(n) && e.hasOwnProperty(r) && !_e(n) && !Ot(n)
				? (e[r] = fi(i, n))
				: (e[r] = n);
		}
		return e;
	}
	const hf = Symbol();
	function mf(e) {
		return !ui(e) || !e.hasOwnProperty(hf);
	}
	const { assign: pt } = Object;
	function gf(e) {
		return !!(_e(e) && e.effect);
	}
	function vf(e, t, r, n) {
		const { state: i, actions: o, getters: s } = t,
			c = r.state.value[e];
		let a;
		function l() {
			c || (r.state.value[e] = i ? i() : {});
			const u = pl(r.state.value[e]);
			return pt(
				u,
				o,
				Object.keys(s || {}).reduce(
					(f, d) => (
						(f[d] = cr(
							ke(() => {
								An(r);
								const h = r._s.get(e);
								return s[d].call(h, h);
							})
						)),
						f
					),
					{}
				)
			);
		}
		return (
			(a = ba(e, l, t, r, n, !0)),
			(a.$reset = function () {
				const f = i ? i() : {};
				this.$patch((d) => {
					pt(d, f);
				});
			}),
			a
		);
	}
	function ba(e, t, r = {}, n, i, o) {
		let s;
		const c = pt({ actions: {} }, r),
			a = { deep: !0 };
		let l,
			u,
			f = cr([]),
			d = cr([]),
			h;
		const g = n.state.value[e];
		!o && !g && (n.state.value[e] = {}), fe({});
		let _;
		function R(A) {
			let E;
			(l = u = !1),
				typeof A == 'function'
					? (A(n.state.value[e]),
					  (E = { type: Mr.patchFunction, storeId: e, events: h }))
					: (fi(n.state.value[e], A),
					  (E = { type: Mr.patchObject, payload: A, storeId: e, events: h }));
			const B = (_ = Symbol());
			Fi().then(() => {
				_ === B && (l = !0);
			}),
				(u = !0),
				Qt(f, E, n.state.value[e]);
		}
		const S = _a;
		function j() {
			s.stop(), (f = []), (d = []), n._s.delete(e);
		}
		function D(A, E) {
			return function () {
				An(n);
				const B = Array.from(arguments),
					w = [],
					te = [];
				function ge(v) {
					w.push(v);
				}
				function Q(v) {
					te.push(v);
				}
				Qt(d, { args: B, name: A, store: P, after: ge, onError: Q });
				let y;
				try {
					y = E.apply(this && this.$id === e ? this : P, B);
				} catch (v) {
					throw (Qt(te, v), v);
				}
				return y instanceof Promise
					? y
							.then((v) => (Qt(w, v), v))
							.catch((v) => (Qt(te, v), Promise.reject(v)))
					: (Qt(w, y), y);
			};
		}
		const b = {
				_p: n,
				$id: e,
				$onAction: Mo.bind(null, d),
				$patch: R,
				$reset: S,
				$subscribe(A, E = {}) {
					const B = Mo(f, A, E.detached, () => w()),
						w = s.run(() =>
							We(
								() => n.state.value[e],
								(te) => {
									(E.flush === 'sync' ? u : l) &&
										A({ storeId: e, type: Mr.direct, events: h }, te);
								},
								pt({}, a, E)
							)
						);
					return B;
				},
				$dispose: j,
			},
			P = ar(pt({}, b));
		n._s.set(e, P);
		const W = n._e.run(() => ((s = bs()), s.run(() => t())));
		for (const A in W) {
			const E = W[A];
			if ((_e(E) && !gf(E)) || Ot(E))
				o ||
					(g && mf(E) && (_e(E) ? (E.value = g[A]) : fi(E, g[A])),
					(n.state.value[e][A] = E));
			else if (typeof E == 'function') {
				const B = D(A, E);
				(W[A] = B), (c.actions[A] = E);
			}
		}
		return (
			pt(P, W),
			pt(se(P), W),
			Object.defineProperty(P, '$state', {
				get: () => n.state.value[e],
				set: (A) => {
					R((E) => {
						pt(E, A);
					});
				},
			}),
			n._p.forEach((A) => {
				pt(
					P,
					s.run(() => A({ store: P, app: n._a, pinia: n, options: c }))
				);
			}),
			g && o && r.hydrate && r.hydrate(P.$state, g),
			(l = !0),
			(u = !0),
			P
		);
	}
	function Ca(e, t, r) {
		let n, i;
		const o = typeof t == 'function';
		typeof e == 'string' ? ((n = e), (i = o ? r : t)) : ((i = e), (n = e.id));
		function s(c, a) {
			const l = Mn();
			return (
				(c = c || (l && Qr(ya))),
				c && An(c),
				(c = va),
				c._s.has(n) || (o ? ba(n, t, i, c) : vf(n, i, c)),
				c._s.get(n)
			);
		}
		return (s.$id = n), s;
	}
	const yf = it({
			__name: 'Tile',
			props: { value: null },
			setup(e) {
				const t = e,
					r = ke(() => {
						if (!t.value) return ['#eee4da', '#eee4da'];
						const n = {
							2: ['#f16528', 'white'],
							4: ['#edd51e', 'black'],
							8: ['#3592cb', 'white'],
							16: ['#f23901', 'white'],
							32: ['#61dafb', '#13252a'],
							64: ['#4f82bf', 'white'],
							128: ['#ff4556', 'white'],
							256: ['#0963a3', 'white'],
							512: ['rgb(255 208 40)', '#261f08'],
							1024: ['rgb(99 108 255)', '#fff'],
							2048: ['#40b883', '#34495e'],
							4096: ['#cb3837', 'white'],
							8192: ['#509640', 'white'],
							16384: ['#2f71ba', 'white'],
							32768: ['white', 'black'],
							65536: ['black', 'white'],
						};
						return t.value in n ? n[t.value] : ['transparent', 'transparent'];
					});
				return (n, i) => (
					de(),
					ye(
						'div',
						{
							'text-dark-50': '',
							rounded: '',
							flex: '',
							'place-items-center': '',
							'place-content-center': '',
							'font-mono': '',
							'lt-md:text-3xl': '',
							'text-5xl': '',
							'font-black': '',
							relative: '',
							'overflow-hidden': '',
							style: sr({
								'background-color': Y(r)[0],
								color: Y(r)[1],
								'box-shadow':
									e.value && e.value >= 64 ? `0 0 10px 0px ${Y(r)[0]}` : 'none',
							}),
						},
						[
							J(
								'div',
								{
									absolute: '',
									'inset-0': '',
									class: yt({
										'border-b-4 border-black border-opacity-10 border-r-4 border-r-white':
											e.value,
									}),
								},
								null,
								2
							),
							Rn(n.$slots, 'default', {}, void 0, !0),
						],
						4
					)
				);
			},
		}),
		St = (e, t) => {
			const r = e.__vccOpts || e;
			for (const [n, i] of t) r[n] = i;
			return r;
		},
		Sa = St(yf, [['__scopeId', 'data-v-18ce7b13']]),
		_f = {
			'bg-secondary': '',
			'aspect-ratio-1': '',
			'rounded-lg': '',
			'p-4': '',
			relative: '',
			class: 'mainBoard',
		},
		bf = it({
			__name: 'Board',
			props: { board: null, score: null },
			setup(e) {
				const t = e,
					r = ke(() => t.board.flat());
				return (n, i) => {
					const o = Sa,
						s = Ys('auto-animate');
					return (
						de(),
						ye('div', _f, [
							n.$slots.default
								? Rn(n.$slots, 'default', { key: 0 }, void 0, !0)
								: (de(),
								  ye(
										xe,
										{ key: 1 },
										[
											J(
												'div',
												{
													style: sr({
														gridTemplateColumns: `repeat(${t.board[0].length}, minmax(0, 1fr))`,
														gridTemplateRows: `repeat(${t.board.length}, minmax(0, 1fr))`,
													}),
													'top-0': '',
													'left-0': '',
													absolute: '',
													grid: '',
													gap: 'lg:4 2',
													'w-full': '',
													'h-full': '',
													'p-4': '',
												},
												[
													(de(!0),
													ye(
														xe,
														null,
														fo(
															Y(r).length,
															(c) => (
																de(),
																ye('div', {
																	key: c,
																	'bg-primary': '',
																	rounded: '',
																	'h-full': '',
																})
															)
														),
														128
													)),
												],
												4
											),
											qs(
												(de(),
												ye(
													'div',
													{
														grid: '',
														style: sr({
															gridTemplateColumns: `repeat(${t.board[0].length}, minmax(0, 1fr))`,
															gridTemplateRows: `repeat(${t.board.length}, minmax(0, 1fr))`,
														}),
														class: 'boardGrid',
														gap: 'lg:4 2',
														relative: '',
														'h-full': '',
													},
													[
														(de(!0),
														ye(
															xe,
															null,
															fo(
																Y(r),
																(c, a) => (
																	de(),
																	Br(
																		o,
																		{
																			key: c ? c[1] : `null-${a}`,
																			class: yt({ 'not-empty': c, empty: !c }),
																			value: c ? c[0] : null,
																			'h-full': '',
																		},
																		{
																			default: qe(() => [
																				Ct(Wt(c ? `${c[0]}` : ''), 1),
																			]),
																			_: 2,
																		},
																		1032,
																		['class', 'value']
																	)
																)
															),
															128
														)),
													],
													4
												)),
												[[s, { duration: 100 }]]
											),
										],
										64
								  )),
						])
					);
				};
			},
		}),
		Ta = St(bf, [['__scopeId', 'data-v-421decaa']]),
		Cf = it({
			__name: 'Button',
			props: { primary: { type: Boolean } },
			setup(e) {
				return (t, r) => (
					de(),
					ye(
						'button',
						{
							'h-10': '',
							'border-1': '',
							'border-border': '',
							'bg-secondary': '',
							'rounded-full': '',
							'font-bold': '',
							'text-lg': '',
							'px-4': '',
							class: yt({
								'!bg-accent-500 !border-accent-300 text-dark-900/70': e.primary,
							}),
						},
						[Rn(t.$slots, 'default', {}, void 0, !0)],
						2
					)
				);
			},
		}),
		Gi = St(Cf, [['__scopeId', 'data-v-0e9f6202']]);
	var Do;
	const mr = typeof window < 'u',
		xa = (e) => typeof e == 'function',
		Gn = (e) => typeof e == 'number',
		Sf = (e) => typeof e == 'string',
		Tf = (e, t, r) => Math.min(r, Math.max(t, e)),
		Jt = () => {};
	mr &&
		((Do = window == null ? void 0 : window.navigator) == null
			? void 0
			: Do.userAgent) &&
		/iP(ad|hone|od)/.test(window.navigator.userAgent);
	function gt(e) {
		return typeof e == 'function' ? e() : Y(e);
	}
	function xf(e, t) {
		function r(...n) {
			e(() => t.apply(this, n), { fn: t, thisArg: this, args: n });
		}
		return r;
	}
	const Pa = (e) => e();
	function Pf(e = Pa) {
		const t = fe(!0);
		function r() {
			t.value = !1;
		}
		function n() {
			t.value = !0;
		}
		return {
			isActive: t,
			pause: r,
			resume: n,
			eventFilter: (...o) => {
				t.value && e(...o);
			},
		};
	}
	function Io(e, t = !1, r = 'Timeout') {
		return new Promise((n, i) => {
			setTimeout(t ? () => i(r) : n, e);
		});
	}
	function kf(e) {
		return e;
	}
	function Et() {
		const e = [],
			t = (i) => {
				const o = e.indexOf(i);
				o !== -1 && e.splice(o, 1);
			};
		return {
			on: (i) => (e.push(i), { off: () => t(i) }),
			off: t,
			trigger: (i) => {
				e.forEach((o) => o(i));
			},
		};
	}
	function zi(e) {
		return Fc() ? (Bc(e), !0) : !1;
	}
	function Ef(e, t = !0) {
		Mn() ? Bi(e) : t ? e() : Fi(e);
	}
	function Rf(e) {
		let t = !1;
		function r(
			f,
			{ flush: d = 'sync', deep: h = !1, timeout: g, throwOnTimeout: _ } = {}
		) {
			let R = null;
			const j = [
				new Promise((D) => {
					R = We(
						e,
						(b) => {
							f(b) !== t && (R == null || R(), D(b));
						},
						{ flush: d, deep: h, immediate: !0 }
					);
				}),
			];
			return (
				g != null &&
					j.push(
						Io(g, _)
							.then(() => gt(e))
							.finally(() => (R == null ? void 0 : R()))
					),
				Promise.race(j)
			);
		}
		function n(f, d) {
			if (!_e(f)) return r((b) => b === f, d);
			const {
				flush: h = 'sync',
				deep: g = !1,
				timeout: _,
				throwOnTimeout: R,
			} = d != null ? d : {};
			let S = null;
			const D = [
				new Promise((b) => {
					S = We(
						[e, f],
						([P, W]) => {
							t !== (P === W) && (S == null || S(), b(P));
						},
						{ flush: h, deep: g, immediate: !0 }
					);
				}),
			];
			return (
				_ != null &&
					D.push(
						Io(_, R)
							.then(() => gt(e))
							.finally(() => (S == null || S(), gt(e)))
					),
				Promise.race(D)
			);
		}
		function i(f) {
			return r((d) => Boolean(d), f);
		}
		function o(f) {
			return n(null, f);
		}
		function s(f) {
			return n(void 0, f);
		}
		function c(f) {
			return r(Number.isNaN, f);
		}
		function a(f, d) {
			return r((h) => {
				const g = Array.from(h);
				return g.includes(f) || g.includes(gt(f));
			}, d);
		}
		function l(f) {
			return u(1, f);
		}
		function u(f = 1, d) {
			let h = -1;
			return r(() => ((h += 1), h >= f), d);
		}
		return Array.isArray(gt(e))
			? {
					toMatch: r,
					toContains: a,
					changed: l,
					changedTimes: u,
					get not() {
						return (t = !t), this;
					},
			  }
			: {
					toMatch: r,
					toBe: n,
					toBeTruthy: i,
					toBeNull: o,
					toBeNaN: c,
					toBeUndefined: s,
					changed: l,
					changedTimes: u,
					get not() {
						return (t = !t), this;
					},
			  };
	}
	function ka(e, t, r = {}) {
		const { immediate: n = !0 } = r,
			i = fe(!1);
		let o = null;
		function s() {
			o && (clearTimeout(o), (o = null));
		}
		function c() {
			(i.value = !1), s();
		}
		function a(...l) {
			s(),
				(i.value = !0),
				(o = setTimeout(() => {
					(i.value = !1), (o = null), e(...l);
				}, gt(t)));
		}
		return (
			n && ((i.value = !0), mr && a()),
			zi(c),
			{ isPending: i, start: a, stop: c }
		);
	}
	var Ao = Object.getOwnPropertySymbols,
		Of = Object.prototype.hasOwnProperty,
		Mf = Object.prototype.propertyIsEnumerable,
		Df = (e, t) => {
			var r = {};
			for (var n in e) Of.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
			if (e != null && Ao)
				for (var n of Ao(e)) t.indexOf(n) < 0 && Mf.call(e, n) && (r[n] = e[n]);
			return r;
		};
	function If(e, t, r = {}) {
		const n = r,
			{ eventFilter: i = Pa } = n,
			o = Df(n, ['eventFilter']);
		return We(e, xf(i, t), o);
	}
	var Af = Object.defineProperty,
		wf = Object.defineProperties,
		jf = Object.getOwnPropertyDescriptors,
		dn = Object.getOwnPropertySymbols,
		Ea = Object.prototype.hasOwnProperty,
		Ra = Object.prototype.propertyIsEnumerable,
		wo = (e, t, r) =>
			t in e
				? Af(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r })
				: (e[t] = r),
		Ff = (e, t) => {
			for (var r in t || (t = {})) Ea.call(t, r) && wo(e, r, t[r]);
			if (dn) for (var r of dn(t)) Ra.call(t, r) && wo(e, r, t[r]);
			return e;
		},
		Bf = (e, t) => wf(e, jf(t)),
		Lf = (e, t) => {
			var r = {};
			for (var n in e) Ea.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
			if (e != null && dn)
				for (var n of dn(e)) t.indexOf(n) < 0 && Ra.call(e, n) && (r[n] = e[n]);
			return r;
		};
	function $f(e, t, r = {}) {
		const n = r,
			{ eventFilter: i } = n,
			o = Lf(n, ['eventFilter']),
			{ eventFilter: s, pause: c, resume: a, isActive: l } = Pf(i);
		return {
			stop: If(e, t, Bf(Ff({}, o), { eventFilter: s })),
			pause: c,
			resume: a,
			isActive: l,
		};
	}
	function Nf(e) {
		var t;
		const r = gt(e);
		return (t = r == null ? void 0 : r.$el) != null ? t : r;
	}
	const qt = mr ? window : void 0;
	mr && window.document;
	const Uf = mr ? window.navigator : void 0;
	mr && window.location;
	function zt(...e) {
		let t, r, n, i;
		if ((Sf(e[0]) ? (([r, n, i] = e), (t = qt)) : ([t, r, n, i] = e), !t))
			return Jt;
		let o = Jt;
		const s = We(
				() => Nf(t),
				(a) => {
					o(),
						a &&
							(a.addEventListener(r, n, i),
							(o = () => {
								a.removeEventListener(r, n, i), (o = Jt);
							}));
				},
				{ immediate: !0, flush: 'post' }
			),
			c = () => {
				s(), o();
			};
		return zi(c), c;
	}
	const Gf = (e) =>
		typeof e == 'function'
			? e
			: typeof e == 'string'
			? (t) => t.key === e
			: Array.isArray(e)
			? (t) => e.includes(t.key)
			: e
			? () => !0
			: () => !1;
	function Kr(e, t, r = {}) {
		const { target: n = qt, eventName: i = 'keydown', passive: o = !1 } = r,
			s = Gf(e);
		return zt(
			n,
			i,
			(a) => {
				s(a) && t(a);
			},
			o
		);
	}
	function zf(e, t = !1) {
		const r = fe(),
			n = () => (r.value = Boolean(e()));
		return n(), Ef(n, t), r;
	}
	function Wf(e = {}) {
		const {
				navigator: t = Uf,
				read: r = !1,
				source: n,
				copiedDuring: i = 1500,
			} = e,
			o = ['copy', 'cut'],
			s = zf(() => t && 'clipboard' in t),
			c = fe(''),
			a = fe(!1),
			l = ka(() => (a.value = !1), i);
		function u() {
			t.clipboard.readText().then((d) => {
				c.value = d;
			});
		}
		if (s.value && r) for (const d of o) zt(d, u);
		async function f(d = gt(n)) {
			s.value &&
				d != null &&
				(await t.clipboard.writeText(d),
				(c.value = d),
				(a.value = !0),
				l.start());
		}
		return { isSupported: s, text: c, copied: a, copy: f };
	}
	const di =
			typeof globalThis < 'u'
				? globalThis
				: typeof window < 'u'
				? window
				: typeof global < 'u'
				? global
				: typeof self < 'u'
				? self
				: {},
		pi = '__vueuse_ssr_handlers__';
	di[pi] = di[pi] || {};
	const Hf = di[pi];
	function Vf(e, t) {
		return Hf[e] || t;
	}
	function Jf(e) {
		return e == null
			? 'any'
			: e instanceof Set
			? 'set'
			: e instanceof Map
			? 'map'
			: e instanceof Date
			? 'date'
			: typeof e == 'boolean'
			? 'boolean'
			: typeof e == 'string'
			? 'string'
			: typeof e == 'object' || Array.isArray(e)
			? 'object'
			: Number.isNaN(e)
			? 'any'
			: 'number';
	}
	var Kf = Object.defineProperty,
		jo = Object.getOwnPropertySymbols,
		qf = Object.prototype.hasOwnProperty,
		Yf = Object.prototype.propertyIsEnumerable,
		Fo = (e, t, r) =>
			t in e
				? Kf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r })
				: (e[t] = r),
		Bo = (e, t) => {
			for (var r in t || (t = {})) qf.call(t, r) && Fo(e, r, t[r]);
			if (jo) for (var r of jo(t)) Yf.call(t, r) && Fo(e, r, t[r]);
			return e;
		};
	const Xf = {
		boolean: { read: (e) => e === 'true', write: (e) => String(e) },
		object: { read: (e) => JSON.parse(e), write: (e) => JSON.stringify(e) },
		number: { read: (e) => Number.parseFloat(e), write: (e) => String(e) },
		any: { read: (e) => e, write: (e) => String(e) },
		string: { read: (e) => e, write: (e) => String(e) },
		map: {
			read: (e) => new Map(JSON.parse(e)),
			write: (e) => JSON.stringify(Array.from(e.entries())),
		},
		set: {
			read: (e) => new Set(JSON.parse(e)),
			write: (e) => JSON.stringify(Array.from(e)),
		},
		date: { read: (e) => new Date(e), write: (e) => e.toISOString() },
	};
	function Zf(e, t, r, n = {}) {
		var i;
		const {
				flush: o = 'pre',
				deep: s = !0,
				listenToStorageChanges: c = !0,
				writeDefaults: a = !0,
				mergeDefaults: l = !1,
				shallow: u,
				window: f = qt,
				eventFilter: d,
				onError: h = (A) => {
					console.error(A);
				},
			} = n,
			g = (u ? ul : fe)(t);
		if (!r)
			try {
				r = Vf('getDefaultStorage', () => {
					var A;
					return (A = qt) == null ? void 0 : A.localStorage;
				})();
			} catch (A) {
				h(A);
			}
		if (!r) return g;
		const _ = gt(t),
			R = Jf(_),
			S = (i = n.serializer) != null ? i : Xf[R],
			{ pause: j, resume: D } = $f(g, () => b(g.value), {
				flush: o,
				deep: s,
				eventFilter: d,
			});
		return f && c && zt(f, 'storage', W), W(), g;
		function b(A) {
			try {
				A == null ? r.removeItem(e) : r.setItem(e, S.write(A));
			} catch (E) {
				h(E);
			}
		}
		function P(A) {
			if (!(A && A.key !== e)) {
				j();
				try {
					const E = A ? A.newValue : r.getItem(e);
					if (E == null) return a && _ !== null && r.setItem(e, S.write(_)), _;
					if (!A && l) {
						const B = S.read(E);
						return xa(l)
							? l(B, _)
							: R === 'object' && !Array.isArray(B)
							? Bo(Bo({}, _), B)
							: B;
					} else return typeof E != 'string' ? E : S.read(E);
				} catch (E) {
					h(E);
				} finally {
					D();
				}
			}
		}
		function W(A) {
			(A && A.key !== e) || (g.value = P(A));
		}
	}
	function Qf(e, t = {}) {
		const { immediate: r = !0, window: n = qt } = t,
			i = fe(!1);
		let o = null;
		function s() {
			!i.value || !n || (e(), (o = n.requestAnimationFrame(s)));
		}
		function c() {
			!i.value && n && ((i.value = !0), s());
		}
		function a() {
			(i.value = !1), o != null && n && (n.cancelAnimationFrame(o), (o = null));
		}
		return r && c(), zi(a), { isActive: i, pause: a, resume: c };
	}
	function ed(e, t, r = {}) {
		const { window: n = qt } = r;
		return Zf(e, t, n == null ? void 0 : n.localStorage, r);
	}
	var et;
	(function (e) {
		(e.UP = 'UP'),
			(e.RIGHT = 'RIGHT'),
			(e.DOWN = 'DOWN'),
			(e.LEFT = 'LEFT'),
			(e.NONE = 'NONE');
	})(et || (et = {}));
	function td(e, t = {}) {
		const {
				threshold: r = 50,
				onSwipe: n,
				onSwipeEnd: i,
				onSwipeStart: o,
				passive: s = !0,
				window: c = qt,
			} = t,
			a = ar({ x: 0, y: 0 }),
			l = ar({ x: 0, y: 0 }),
			u = ke(() => a.x - l.x),
			f = ke(() => a.y - l.y),
			{ max: d, abs: h } = Math,
			g = ke(() => d(h(u.value), h(f.value)) >= r),
			_ = fe(!1),
			R = ke(() =>
				g.value
					? h(u.value) > h(f.value)
						? u.value > 0
							? et.LEFT
							: et.RIGHT
						: f.value > 0
						? et.UP
						: et.DOWN
					: et.NONE
			),
			S = (B) => [B.touches[0].clientX, B.touches[0].clientY],
			j = (B, w) => {
				(a.x = B), (a.y = w);
			},
			D = (B, w) => {
				(l.x = B), (l.y = w);
			};
		let b;
		const P = rd(c == null ? void 0 : c.document);
		s
			? (b = P ? { passive: !0 } : { capture: !1 })
			: (b = P ? { passive: !1, capture: !0 } : { capture: !0 });
		const W = (B) => {
				_.value && (i == null || i(B, R.value)), (_.value = !1);
			},
			A = [
				zt(
					e,
					'touchstart',
					(B) => {
						b.capture && !b.passive && B.preventDefault();
						const [w, te] = S(B);
						j(w, te), D(w, te), o == null || o(B);
					},
					b
				),
				zt(
					e,
					'touchmove',
					(B) => {
						const [w, te] = S(B);
						D(w, te),
							!_.value && g.value && (_.value = !0),
							_.value && (n == null || n(B));
					},
					b
				),
				zt(e, 'touchend', W, b),
				zt(e, 'touchcancel', W, b),
			];
		return {
			isPassiveEventSupported: P,
			isSwiping: _,
			direction: R,
			coordsStart: a,
			coordsEnd: l,
			lengthX: u,
			lengthY: f,
			stop: () => A.forEach((B) => B()),
		};
	}
	function rd(e) {
		if (!e) return !1;
		let t = !1;
		const r = {
			get passive() {
				return (t = !0), !1;
			},
		};
		return e.addEventListener('x', Jt, r), e.removeEventListener('x', Jt), t;
	}
	function nd([e, t, r, n]) {
		const i = (u, f) => 1 - 3 * f + 3 * u,
			o = (u, f) => 3 * f - 6 * u,
			s = (u) => 3 * u,
			c = (u, f, d) => ((i(f, d) * u + o(f, d)) * u + s(f)) * u,
			a = (u, f, d) => 3 * i(f, d) * u * u + 2 * o(f, d) * u + s(f),
			l = (u) => {
				let f = u;
				for (let d = 0; d < 4; ++d) {
					const h = a(f, e, r);
					if (h === 0) return f;
					f -= (c(f, e, r) - u) / h;
				}
				return f;
			};
		return (u) => (e === t && r === n ? u : c(l(u), t, n));
	}
	function Oa(e, t = {}) {
		const {
				delay: r = 0,
				disabled: n = !1,
				duration: i = 1e3,
				onFinished: o = Jt,
				onStarted: s = Jt,
				transition: c = kf,
			} = t,
			a = ke(() => {
				const P = Y(c);
				return xa(P) ? P : nd(P);
			}),
			l = ke(() => {
				const P = Y(e);
				return Gn(P) ? P : P.map(Y);
			}),
			u = ke(() => (Gn(l.value) ? [l.value] : l.value)),
			f = fe(u.value.slice(0));
		let d, h, g, _, R;
		const { resume: S, pause: j } = Qf(
				() => {
					const P = Date.now(),
						W = Tf(1 - (g - P) / d, 0, 1);
					(f.value = R.map((A, E) => {
						var B;
						return A + ((B = h[E]) != null ? B : 0) * a.value(W);
					})),
						W >= 1 && (j(), o());
				},
				{ immediate: !1 }
			),
			D = () => {
				j(),
					(d = Y(i)),
					(h = f.value.map((P, W) => {
						var A, E;
						return (
							((A = u.value[W]) != null ? A : 0) -
							((E = f.value[W]) != null ? E : 0)
						);
					})),
					(R = f.value.slice(0)),
					(_ = Date.now()),
					(g = _ + d),
					S(),
					s();
			},
			b = ka(D, r, { immediate: !1 });
		return (
			We(
				u,
				() => {
					Y(n) ? (f.value = u.value.slice(0)) : Y(r) <= 0 ? D() : b.start();
				},
				{ deep: !0 }
			),
			ke(() => {
				const P = Y(n) ? u : f;
				return Gn(l.value) ? P.value[0] : P.value;
			})
		);
	}
	function Lo(e, t) {
		const r = () => {
			const n = e.length;
			for (let i = 0; i < n / 2; i++)
				for (let o = i; o < n - i - 1; o++) {
					const s = e[i][o];
					(e[i][o] = e[n - 1 - o][i]),
						(e[n - 1 - o][i] = e[n - 1 - i][n - 1 - o]),
						(e[n - 1 - i][n - 1 - o] = e[o][n - 1 - i]),
						(e[o][n - 1 - i] = s);
				}
		};
		for (let n = 0; n < t; n++) r();
		return e;
	}
	function $o(e) {
		return (
			(e = Math.floor(e * (1e4 - 0 + 1)) + 0),
			function (t, r) {
				let n = (e += 1831565813);
				(n = Math.imul(n ^ (n >>> 15), n | 1)),
					(n ^= n + Math.imul(n ^ (n >>> 7), n | 61));
				const i = ((n ^ (n >>> 14)) >>> 0) / 4294967296;
				return typeof t < 'u' && typeof r < 'u'
					? Math.floor(i * (r - t + 1)) + t
					: i;
			}
		);
	}
	function Ma(e, t) {
		if (!Array.isArray(e) || !Array.isArray(t)) return e === t;
		if (e.length !== t.length) return !1;
		for (let r = 0, n = e.length; r < n; r++) if (!Ma(e[r], t[r])) return !1;
		return !0;
	}
	function Da(e) {
		const t = e.length,
			r = new Array(t);
		for (let n = 0; n < t; n++)
			Array.isArray(e[n]) ? (r[n] = Da(e[n])) : (r[n] = e[n]);
		return r;
	}
	let id = 0;
	const od = () => (id += 1),
		sd = 2048,
		ad = (e) => {
			switch (e) {
				case 'up':
					return 0;
				case 'down':
					return 2;
				case 'left':
					return 1;
				case 'right':
					return 3;
			}
		};
	function No() {
		const e = fe(Math.random()),
			t = Et(),
			r = Et();
		let n = $o(e.value);
		const i = fe(0),
			o = fe(4),
			s = fe(4),
			c = fe(
				Array.from({ length: o.value }).map(() =>
					Array.from({ length: s.value }).map(() => null)
				)
			),
			a = fe(!1),
			l = fe(!1);
		We(a, () => {
			a.value === !0 && r.trigger();
		});
		const u = (D) => {
				for (let b = 0; b < D.length; b++)
					for (let P = 0; P < D[b].length; P++) if (D[b][P] === null) return !1;
				for (let b = 0; b < D.length; b++)
					for (let P = 0; P < D[b].length; P++) {
						if (b + 1 < D.length) {
							const W = D[b][P],
								A = D[b + 1][P];
							if (W[0] === A[0]) return !1;
						}
						if (P + 1 < D[b].length) {
							const W = D[b][P],
								A = D[b][P + 1];
							if (W[0] === A[0]) return !1;
						}
					}
				return !0;
			},
			f = (D) => {
				const b = n() < 0.9 ? 2 : 4,
					P = n(0, o.value - 1),
					W = n(0, s.value - 1);
				return (
					D[P][W] !== null ? f(D) : (D[P][W] = [b, od()]),
					u(D) && (l.value = !0),
					D
				);
			},
			d = (D) => {
				(i.value = 0),
					(l.value = !1),
					(a.value = !1),
					D && ((e.value = D), (n = $o(D)));
				let b = Array.from({ length: o.value }).map(() =>
					Array.from({ length: s.value }).map(() => null)
				);
				(b = f(b)), (b = f(b)), (c.value = b);
			},
			h = (D) => {
				let b = Da(c.value);
				const [P, W, A] = D === 'down' ? [0, o.value, 1] : [0, o.value, 1],
					[E, B, w] = D === 'right' ? [s.value - 1, -1, -1] : [0, s.value, 1],
					te = ad(D);
				b = Lo(b, te);
				const ge = [];
				for (let Q = P; Q !== W; Q += A)
					for (let y = E; y !== B; y += w) {
						const v = (G) => {
							if (Q - G < 0) return;
							const N = b[Q][y],
								$ = b[Q - G][y];
							if (N && $ && N[0] === $[0] && !ge.includes(b[Q - G][y][1])) {
								(b[Q - G][y] = [b[Q][y][0] * 2, b[Q][y][1]]),
									(i.value += b[Q - G][y][0]),
									(b[Q][y] = null),
									ge.push(b[Q - G][y][1]),
									b[Q - G][y][0] === sd && !a.value && (a.value = !0);
								return;
							} else if (b[Q - G][y] !== null) return;
							v(G + 1);
						};
						v(1);
					}
				for (let Q = P; Q !== W; Q += A)
					for (let y = E; y !== B; y += w)
						for (let v = Q; v > 0; v--)
							b[v - 1][y] === null &&
								((b[v - 1][y] = b[v][y]), (b[v][y] = null));
				(b = Lo(b, b.length - te)),
					Ma(b, c.value) || (b = f(b)),
					(c.value = b),
					t.trigger(D);
			},
			g = ke(() =>
				Math.max(...c.value.map((D) => D.map((b) => (b ? b[0] : 0))).flat())
			);
		return {
			board: c,
			score: i,
			init: d,
			up: () => h('up'),
			down: () => h('down'),
			left: () => h('left'),
			right: () => h('right'),
			move: h,
			seed: e,
			isGameOver: l,
			hasWon: a,
			largestTile: g,
			onWon: r.on,
			onMove: t.on,
		};
	}
	var Wi = { exports: {} };
	(function (e) {
		var t = {};
		(t.useBlobBuilder = (function () {
			try {
				return new Blob([]), !1;
			} catch {
				return !0;
			}
		})()),
			(t.useArrayBufferView =
				!t.useBlobBuilder &&
				(function () {
					try {
						return new Blob([new Uint8Array([])]).size === 0;
					} catch {
						return !0;
					}
				})()),
			(e.exports.binaryFeatures = t);
		var r = e.exports.BlobBuilder;
		typeof window < 'u' &&
			(r = e.exports.BlobBuilder =
				window.WebKitBlobBuilder ||
				window.MozBlobBuilder ||
				window.MSBlobBuilder ||
				window.BlobBuilder);
		function n() {
			(this._pieces = []), (this._parts = []);
		}
		(n.prototype.append = function (i) {
			typeof i == 'number'
				? this._pieces.push(i)
				: (this.flush(), this._parts.push(i));
		}),
			(n.prototype.flush = function () {
				if (this._pieces.length > 0) {
					var i = new Uint8Array(this._pieces);
					t.useArrayBufferView || (i = i.buffer),
						this._parts.push(i),
						(this._pieces = []);
				}
			}),
			(n.prototype.getBuffer = function () {
				if ((this.flush(), t.useBlobBuilder)) {
					for (var i = new r(), o = 0, s = this._parts.length; o < s; o++)
						i.append(this._parts[o]);
					return i.getBlob();
				} else return new Blob(this._parts);
			}),
			(e.exports.BufferBuilder = n);
	})(Wi);
	var cd = Wi.exports.BufferBuilder,
		Uo = Wi.exports.binaryFeatures,
		ld = {
			unpack: function (e) {
				var t = new Me(e);
				return t.unpack();
			},
			pack: function (e) {
				var t = new De();
				t.pack(e);
				var r = t.getBuffer();
				return r;
			},
		},
		Go = ld;
	function Me(e) {
		(this.index = 0),
			(this.dataBuffer = e),
			(this.dataView = new Uint8Array(this.dataBuffer)),
			(this.length = this.dataBuffer.byteLength);
	}
	Me.prototype.unpack = function () {
		var e = this.unpack_uint8();
		if (e < 128) return e;
		if ((e ^ 224) < 32) return (e ^ 224) - 32;
		var t;
		if ((t = e ^ 160) <= 15) return this.unpack_raw(t);
		if ((t = e ^ 176) <= 15) return this.unpack_string(t);
		if ((t = e ^ 144) <= 15) return this.unpack_array(t);
		if ((t = e ^ 128) <= 15) return this.unpack_map(t);
		switch (e) {
			case 192:
				return null;
			case 193:
				return;
			case 194:
				return !1;
			case 195:
				return !0;
			case 202:
				return this.unpack_float();
			case 203:
				return this.unpack_double();
			case 204:
				return this.unpack_uint8();
			case 205:
				return this.unpack_uint16();
			case 206:
				return this.unpack_uint32();
			case 207:
				return this.unpack_uint64();
			case 208:
				return this.unpack_int8();
			case 209:
				return this.unpack_int16();
			case 210:
				return this.unpack_int32();
			case 211:
				return this.unpack_int64();
			case 212:
				return;
			case 213:
				return;
			case 214:
				return;
			case 215:
				return;
			case 216:
				return (t = this.unpack_uint16()), this.unpack_string(t);
			case 217:
				return (t = this.unpack_uint32()), this.unpack_string(t);
			case 218:
				return (t = this.unpack_uint16()), this.unpack_raw(t);
			case 219:
				return (t = this.unpack_uint32()), this.unpack_raw(t);
			case 220:
				return (t = this.unpack_uint16()), this.unpack_array(t);
			case 221:
				return (t = this.unpack_uint32()), this.unpack_array(t);
			case 222:
				return (t = this.unpack_uint16()), this.unpack_map(t);
			case 223:
				return (t = this.unpack_uint32()), this.unpack_map(t);
		}
	};
	Me.prototype.unpack_uint8 = function () {
		var e = this.dataView[this.index] & 255;
		return this.index++, e;
	};
	Me.prototype.unpack_uint16 = function () {
		var e = this.read(2),
			t = (e[0] & 255) * 256 + (e[1] & 255);
		return (this.index += 2), t;
	};
	Me.prototype.unpack_uint32 = function () {
		var e = this.read(4),
			t = ((e[0] * 256 + e[1]) * 256 + e[2]) * 256 + e[3];
		return (this.index += 4), t;
	};
	Me.prototype.unpack_uint64 = function () {
		var e = this.read(8),
			t =
				((((((e[0] * 256 + e[1]) * 256 + e[2]) * 256 + e[3]) * 256 + e[4]) *
					256 +
					e[5]) *
					256 +
					e[6]) *
					256 +
				e[7];
		return (this.index += 8), t;
	};
	Me.prototype.unpack_int8 = function () {
		var e = this.unpack_uint8();
		return e < 128 ? e : e - (1 << 8);
	};
	Me.prototype.unpack_int16 = function () {
		var e = this.unpack_uint16();
		return e < 32768 ? e : e - (1 << 16);
	};
	Me.prototype.unpack_int32 = function () {
		var e = this.unpack_uint32();
		return e < Math.pow(2, 31) ? e : e - Math.pow(2, 32);
	};
	Me.prototype.unpack_int64 = function () {
		var e = this.unpack_uint64();
		return e < Math.pow(2, 63) ? e : e - Math.pow(2, 64);
	};
	Me.prototype.unpack_raw = function (e) {
		if (this.length < this.index + e)
			throw new Error(
				'BinaryPackFailure: index is out of range ' +
					this.index +
					' ' +
					e +
					' ' +
					this.length
			);
		var t = this.dataBuffer.slice(this.index, this.index + e);
		return (this.index += e), t;
	};
	Me.prototype.unpack_string = function (e) {
		for (var t = this.read(e), r = 0, n = '', i, o; r < e; )
			(i = t[r]),
				i < 128
					? ((n += String.fromCharCode(i)), r++)
					: (i ^ 192) < 32
					? ((o = ((i ^ 192) << 6) | (t[r + 1] & 63)),
					  (n += String.fromCharCode(o)),
					  (r += 2))
					: ((o = ((i & 15) << 12) | ((t[r + 1] & 63) << 6) | (t[r + 2] & 63)),
					  (n += String.fromCharCode(o)),
					  (r += 3));
		return (this.index += e), n;
	};
	Me.prototype.unpack_array = function (e) {
		for (var t = new Array(e), r = 0; r < e; r++) t[r] = this.unpack();
		return t;
	};
	Me.prototype.unpack_map = function (e) {
		for (var t = {}, r = 0; r < e; r++) {
			var n = this.unpack(),
				i = this.unpack();
			t[n] = i;
		}
		return t;
	};
	Me.prototype.unpack_float = function () {
		var e = this.unpack_uint32(),
			t = e >> 31,
			r = ((e >> 23) & 255) - 127,
			n = (e & 8388607) | 8388608;
		return (t === 0 ? 1 : -1) * n * Math.pow(2, r - 23);
	};
	Me.prototype.unpack_double = function () {
		var e = this.unpack_uint32(),
			t = this.unpack_uint32(),
			r = e >> 31,
			n = ((e >> 20) & 2047) - 1023,
			i = (e & 1048575) | 1048576,
			o = i * Math.pow(2, n - 20) + t * Math.pow(2, n - 52);
		return (r === 0 ? 1 : -1) * o;
	};
	Me.prototype.read = function (e) {
		var t = this.index;
		if (t + e <= this.length) return this.dataView.subarray(t, t + e);
		throw new Error('BinaryPackFailure: read index out of range');
	};
	function De() {
		this.bufferBuilder = new cd();
	}
	De.prototype.getBuffer = function () {
		return this.bufferBuilder.getBuffer();
	};
	De.prototype.pack = function (e) {
		var t = typeof e;
		if (t === 'string') this.pack_string(e);
		else if (t === 'number')
			Math.floor(e) === e ? this.pack_integer(e) : this.pack_double(e);
		else if (t === 'boolean')
			e === !0
				? this.bufferBuilder.append(195)
				: e === !1 && this.bufferBuilder.append(194);
		else if (t === 'undefined') this.bufferBuilder.append(192);
		else if (t === 'object')
			if (e === null) this.bufferBuilder.append(192);
			else {
				var r = e.constructor;
				if (r == Array) this.pack_array(e);
				else if (
					r == Blob ||
					r == File ||
					e instanceof Blob ||
					e instanceof File
				)
					this.pack_bin(e);
				else if (r == ArrayBuffer)
					Uo.useArrayBufferView
						? this.pack_bin(new Uint8Array(e))
						: this.pack_bin(e);
				else if ('BYTES_PER_ELEMENT' in e)
					Uo.useArrayBufferView
						? this.pack_bin(new Uint8Array(e.buffer))
						: this.pack_bin(e.buffer);
				else if (r == Object || r.toString().startsWith('class'))
					this.pack_object(e);
				else if (r == Date) this.pack_string(e.toString());
				else if (typeof e.toBinaryPack == 'function')
					this.bufferBuilder.append(e.toBinaryPack());
				else throw new Error('Type "' + r.toString() + '" not yet supported');
			}
		else throw new Error('Type "' + t + '" not yet supported');
		this.bufferBuilder.flush();
	};
	De.prototype.pack_bin = function (e) {
		var t = e.length || e.byteLength || e.size;
		if (t <= 15) this.pack_uint8(160 + t);
		else if (t <= 65535) this.bufferBuilder.append(218), this.pack_uint16(t);
		else if (t <= 4294967295)
			this.bufferBuilder.append(219), this.pack_uint32(t);
		else throw new Error('Invalid length');
		this.bufferBuilder.append(e);
	};
	De.prototype.pack_string = function (e) {
		var t = fd(e);
		if (t <= 15) this.pack_uint8(176 + t);
		else if (t <= 65535) this.bufferBuilder.append(216), this.pack_uint16(t);
		else if (t <= 4294967295)
			this.bufferBuilder.append(217), this.pack_uint32(t);
		else throw new Error('Invalid length');
		this.bufferBuilder.append(e);
	};
	De.prototype.pack_array = function (e) {
		var t = e.length;
		if (t <= 15) this.pack_uint8(144 + t);
		else if (t <= 65535) this.bufferBuilder.append(220), this.pack_uint16(t);
		else if (t <= 4294967295)
			this.bufferBuilder.append(221), this.pack_uint32(t);
		else throw new Error('Invalid length');
		for (var r = 0; r < t; r++) this.pack(e[r]);
	};
	De.prototype.pack_integer = function (e) {
		if (e >= -32 && e <= 127) this.bufferBuilder.append(e & 255);
		else if (e >= 0 && e <= 255)
			this.bufferBuilder.append(204), this.pack_uint8(e);
		else if (e >= -128 && e <= 127)
			this.bufferBuilder.append(208), this.pack_int8(e);
		else if (e >= 0 && e <= 65535)
			this.bufferBuilder.append(205), this.pack_uint16(e);
		else if (e >= -32768 && e <= 32767)
			this.bufferBuilder.append(209), this.pack_int16(e);
		else if (e >= 0 && e <= 4294967295)
			this.bufferBuilder.append(206), this.pack_uint32(e);
		else if (e >= -2147483648 && e <= 2147483647)
			this.bufferBuilder.append(210), this.pack_int32(e);
		else if (e >= -9223372036854776e3 && e <= 9223372036854776e3)
			this.bufferBuilder.append(211), this.pack_int64(e);
		else if (e >= 0 && e <= 18446744073709552e3)
			this.bufferBuilder.append(207), this.pack_uint64(e);
		else throw new Error('Invalid integer');
	};
	De.prototype.pack_double = function (e) {
		var t = 0;
		e < 0 && ((t = 1), (e = -e));
		var r = Math.floor(Math.log(e) / Math.LN2),
			n = e / Math.pow(2, r) - 1,
			i = Math.floor(n * Math.pow(2, 52)),
			o = Math.pow(2, 32),
			s = (t << 31) | ((r + 1023) << 20) | ((i / o) & 1048575),
			c = i % o;
		this.bufferBuilder.append(203), this.pack_int32(s), this.pack_int32(c);
	};
	De.prototype.pack_object = function (e) {
		var t = Object.keys(e),
			r = t.length;
		if (r <= 15) this.pack_uint8(128 + r);
		else if (r <= 65535) this.bufferBuilder.append(222), this.pack_uint16(r);
		else if (r <= 4294967295)
			this.bufferBuilder.append(223), this.pack_uint32(r);
		else throw new Error('Invalid length');
		for (var n in e) e.hasOwnProperty(n) && (this.pack(n), this.pack(e[n]));
	};
	De.prototype.pack_uint8 = function (e) {
		this.bufferBuilder.append(e);
	};
	De.prototype.pack_uint16 = function (e) {
		this.bufferBuilder.append(e >> 8), this.bufferBuilder.append(e & 255);
	};
	De.prototype.pack_uint32 = function (e) {
		var t = e & 4294967295;
		this.bufferBuilder.append((t & 4278190080) >>> 24),
			this.bufferBuilder.append((t & 16711680) >>> 16),
			this.bufferBuilder.append((t & 65280) >>> 8),
			this.bufferBuilder.append(t & 255);
	};
	De.prototype.pack_uint64 = function (e) {
		var t = e / Math.pow(2, 32),
			r = e % Math.pow(2, 32);
		this.bufferBuilder.append((t & 4278190080) >>> 24),
			this.bufferBuilder.append((t & 16711680) >>> 16),
			this.bufferBuilder.append((t & 65280) >>> 8),
			this.bufferBuilder.append(t & 255),
			this.bufferBuilder.append((r & 4278190080) >>> 24),
			this.bufferBuilder.append((r & 16711680) >>> 16),
			this.bufferBuilder.append((r & 65280) >>> 8),
			this.bufferBuilder.append(r & 255);
	};
	De.prototype.pack_int8 = function (e) {
		this.bufferBuilder.append(e & 255);
	};
	De.prototype.pack_int16 = function (e) {
		this.bufferBuilder.append((e & 65280) >> 8),
			this.bufferBuilder.append(e & 255);
	};
	De.prototype.pack_int32 = function (e) {
		this.bufferBuilder.append((e >>> 24) & 255),
			this.bufferBuilder.append((e & 16711680) >>> 16),
			this.bufferBuilder.append((e & 65280) >>> 8),
			this.bufferBuilder.append(e & 255);
	};
	De.prototype.pack_int64 = function (e) {
		var t = Math.floor(e / Math.pow(2, 32)),
			r = e % Math.pow(2, 32);
		this.bufferBuilder.append((t & 4278190080) >>> 24),
			this.bufferBuilder.append((t & 16711680) >>> 16),
			this.bufferBuilder.append((t & 65280) >>> 8),
			this.bufferBuilder.append(t & 255),
			this.bufferBuilder.append((r & 4278190080) >>> 24),
			this.bufferBuilder.append((r & 16711680) >>> 16),
			this.bufferBuilder.append((r & 65280) >>> 8),
			this.bufferBuilder.append(r & 255);
	};
	function ud(e) {
		var t = e.charCodeAt(0);
		return t <= 2047
			? '00'
			: t <= 65535
			? '000'
			: t <= 2097151
			? '0000'
			: t <= 67108863
			? '00000'
			: '000000';
	}
	function fd(e) {
		return e.length > 600
			? new Blob([e]).size
			: e.replace(/[^\u0000-\u007F]/g, ud).length;
	}
	let Ia = !0,
		Aa = !0;
	function Sr(e, t, r) {
		const n = e.match(t);
		return n && n.length >= r && parseInt(n[r], 10);
	}
	function gr(e, t, r) {
		if (!e.RTCPeerConnection) return;
		const n = e.RTCPeerConnection.prototype,
			i = n.addEventListener;
		n.addEventListener = function (s, c) {
			if (s !== t) return i.apply(this, arguments);
			const a = (l) => {
				const u = r(l);
				u && (c.handleEvent ? c.handleEvent(u) : c(u));
			};
			return (
				(this._eventMap = this._eventMap || {}),
				this._eventMap[t] || (this._eventMap[t] = new Map()),
				this._eventMap[t].set(c, a),
				i.apply(this, [s, a])
			);
		};
		const o = n.removeEventListener;
		(n.removeEventListener = function (s, c) {
			if (s !== t || !this._eventMap || !this._eventMap[t])
				return o.apply(this, arguments);
			if (!this._eventMap[t].has(c)) return o.apply(this, arguments);
			const a = this._eventMap[t].get(c);
			return (
				this._eventMap[t].delete(c),
				this._eventMap[t].size === 0 && delete this._eventMap[t],
				Object.keys(this._eventMap).length === 0 && delete this._eventMap,
				o.apply(this, [s, a])
			);
		}),
			Object.defineProperty(n, 'on' + t, {
				get() {
					return this['_on' + t];
				},
				set(s) {
					this['_on' + t] &&
						(this.removeEventListener(t, this['_on' + t]),
						delete this['_on' + t]),
						s && this.addEventListener(t, (this['_on' + t] = s));
				},
				enumerable: !0,
				configurable: !0,
			});
	}
	function dd(e) {
		return typeof e != 'boolean'
			? new Error('Argument type: ' + typeof e + '. Please use a boolean.')
			: ((Ia = e),
			  e ? 'adapter.js logging disabled' : 'adapter.js logging enabled');
	}
	function pd(e) {
		return typeof e != 'boolean'
			? new Error('Argument type: ' + typeof e + '. Please use a boolean.')
			: ((Aa = !e),
			  'adapter.js deprecation warnings ' + (e ? 'disabled' : 'enabled'));
	}
	function Hi() {
		if (typeof window == 'object') {
			if (Ia) return;
			typeof console < 'u' &&
				typeof console.log == 'function' &&
				console.log.apply(console, arguments);
		}
	}
	function wn(e, t) {
		!Aa || console.warn(e + ' is deprecated, please use ' + t + ' instead.');
	}
	function hd(e) {
		const t = { browser: null, version: null };
		if (typeof e > 'u' || !e.navigator)
			return (t.browser = 'Not a browser.'), t;
		const { navigator: r } = e;
		if (r.mozGetUserMedia)
			(t.browser = 'firefox'),
				(t.version = Sr(r.userAgent, /Firefox\/(\d+)\./, 1));
		else if (
			r.webkitGetUserMedia ||
			(e.isSecureContext === !1 &&
				e.webkitRTCPeerConnection &&
				!e.RTCIceGatherer)
		)
			(t.browser = 'chrome'),
				(t.version = Sr(r.userAgent, /Chrom(e|ium)\/(\d+)\./, 2));
		else if (r.mediaDevices && r.userAgent.match(/Edge\/(\d+).(\d+)$/))
			(t.browser = 'edge'),
				(t.version = Sr(r.userAgent, /Edge\/(\d+).(\d+)$/, 2));
		else if (e.RTCPeerConnection && r.userAgent.match(/AppleWebKit\/(\d+)\./))
			(t.browser = 'safari'),
				(t.version = Sr(r.userAgent, /AppleWebKit\/(\d+)\./, 1)),
				(t.supportsUnifiedPlan =
					e.RTCRtpTransceiver &&
					'currentDirection' in e.RTCRtpTransceiver.prototype);
		else return (t.browser = 'Not a supported browser.'), t;
		return t;
	}
	function zo(e) {
		return Object.prototype.toString.call(e) === '[object Object]';
	}
	function wa(e) {
		return zo(e)
			? Object.keys(e).reduce(function (t, r) {
					const n = zo(e[r]),
						i = n ? wa(e[r]) : e[r],
						o = n && !Object.keys(i).length;
					return i === void 0 || o ? t : Object.assign(t, { [r]: i });
			  }, {})
			: e;
	}
	function hi(e, t, r) {
		!t ||
			r.has(t.id) ||
			(r.set(t.id, t),
			Object.keys(t).forEach((n) => {
				n.endsWith('Id')
					? hi(e, e.get(t[n]), r)
					: n.endsWith('Ids') &&
					  t[n].forEach((i) => {
							hi(e, e.get(i), r);
					  });
			}));
	}
	function Wo(e, t, r) {
		const n = r ? 'outbound-rtp' : 'inbound-rtp',
			i = new Map();
		if (t === null) return i;
		const o = [];
		return (
			e.forEach((s) => {
				s.type === 'track' && s.trackIdentifier === t.id && o.push(s);
			}),
			o.forEach((s) => {
				e.forEach((c) => {
					c.type === n && c.trackId === s.id && hi(e, c, i);
				});
			}),
			i
		);
	}
	const Ho = Hi;
	function ja(e, t) {
		const r = e && e.navigator;
		if (!r.mediaDevices) return;
		const n = function (c) {
				if (typeof c != 'object' || c.mandatory || c.optional) return c;
				const a = {};
				return (
					Object.keys(c).forEach((l) => {
						if (l === 'require' || l === 'advanced' || l === 'mediaSource')
							return;
						const u = typeof c[l] == 'object' ? c[l] : { ideal: c[l] };
						u.exact !== void 0 &&
							typeof u.exact == 'number' &&
							(u.min = u.max = u.exact);
						const f = function (d, h) {
							return d
								? d + h.charAt(0).toUpperCase() + h.slice(1)
								: h === 'deviceId'
								? 'sourceId'
								: h;
						};
						if (u.ideal !== void 0) {
							a.optional = a.optional || [];
							let d = {};
							typeof u.ideal == 'number'
								? ((d[f('min', l)] = u.ideal),
								  a.optional.push(d),
								  (d = {}),
								  (d[f('max', l)] = u.ideal),
								  a.optional.push(d))
								: ((d[f('', l)] = u.ideal), a.optional.push(d));
						}
						u.exact !== void 0 && typeof u.exact != 'number'
							? ((a.mandatory = a.mandatory || {}),
							  (a.mandatory[f('', l)] = u.exact))
							: ['min', 'max'].forEach((d) => {
									u[d] !== void 0 &&
										((a.mandatory = a.mandatory || {}),
										(a.mandatory[f(d, l)] = u[d]));
							  });
					}),
					c.advanced && (a.optional = (a.optional || []).concat(c.advanced)),
					a
				);
			},
			i = function (c, a) {
				if (t.version >= 61) return a(c);
				if (
					((c = JSON.parse(JSON.stringify(c))), c && typeof c.audio == 'object')
				) {
					const l = function (u, f, d) {
						f in u && !(d in u) && ((u[d] = u[f]), delete u[f]);
					};
					(c = JSON.parse(JSON.stringify(c))),
						l(c.audio, 'autoGainControl', 'googAutoGainControl'),
						l(c.audio, 'noiseSuppression', 'googNoiseSuppression'),
						(c.audio = n(c.audio));
				}
				if (c && typeof c.video == 'object') {
					let l = c.video.facingMode;
					l = l && (typeof l == 'object' ? l : { ideal: l });
					const u = t.version < 66;
					if (
						l &&
						(l.exact === 'user' ||
							l.exact === 'environment' ||
							l.ideal === 'user' ||
							l.ideal === 'environment') &&
						!(
							r.mediaDevices.getSupportedConstraints &&
							r.mediaDevices.getSupportedConstraints().facingMode &&
							!u
						)
					) {
						delete c.video.facingMode;
						let f;
						if (
							(l.exact === 'environment' || l.ideal === 'environment'
								? (f = ['back', 'rear'])
								: (l.exact === 'user' || l.ideal === 'user') && (f = ['front']),
							f)
						)
							return r.mediaDevices.enumerateDevices().then((d) => {
								d = d.filter((g) => g.kind === 'videoinput');
								let h = d.find((g) =>
									f.some((_) => g.label.toLowerCase().includes(_))
								);
								return (
									!h && d.length && f.includes('back') && (h = d[d.length - 1]),
									h &&
										(c.video.deviceId = l.exact
											? { exact: h.deviceId }
											: { ideal: h.deviceId }),
									(c.video = n(c.video)),
									Ho('chrome: ' + JSON.stringify(c)),
									a(c)
								);
							});
					}
					c.video = n(c.video);
				}
				return Ho('chrome: ' + JSON.stringify(c)), a(c);
			},
			o = function (c) {
				return t.version >= 64
					? c
					: {
							name:
								{
									PermissionDeniedError: 'NotAllowedError',
									PermissionDismissedError: 'NotAllowedError',
									InvalidStateError: 'NotAllowedError',
									DevicesNotFoundError: 'NotFoundError',
									ConstraintNotSatisfiedError: 'OverconstrainedError',
									TrackStartError: 'NotReadableError',
									MediaDeviceFailedDueToShutdown: 'NotAllowedError',
									MediaDeviceKillSwitchOn: 'NotAllowedError',
									TabCaptureError: 'AbortError',
									ScreenCaptureError: 'AbortError',
									DeviceCaptureError: 'AbortError',
								}[c.name] || c.name,
							message: c.message,
							constraint: c.constraint || c.constraintName,
							toString() {
								return this.name + (this.message && ': ') + this.message;
							},
					  };
			},
			s = function (c, a, l) {
				i(c, (u) => {
					r.webkitGetUserMedia(u, a, (f) => {
						l && l(o(f));
					});
				});
			};
		if (((r.getUserMedia = s.bind(r)), r.mediaDevices.getUserMedia)) {
			const c = r.mediaDevices.getUserMedia.bind(r.mediaDevices);
			r.mediaDevices.getUserMedia = function (a) {
				return i(a, (l) =>
					c(l).then(
						(u) => {
							if (
								(l.audio && !u.getAudioTracks().length) ||
								(l.video && !u.getVideoTracks().length)
							)
								throw (
									(u.getTracks().forEach((f) => {
										f.stop();
									}),
									new DOMException('', 'NotFoundError'))
								);
							return u;
						},
						(u) => Promise.reject(o(u))
					)
				);
			};
		}
	}
	function md(e, t) {
		if (
			!(
				e.navigator.mediaDevices &&
				'getDisplayMedia' in e.navigator.mediaDevices
			) &&
			!!e.navigator.mediaDevices
		) {
			if (typeof t != 'function') {
				console.error(
					'shimGetDisplayMedia: getSourceId argument is not a function'
				);
				return;
			}
			e.navigator.mediaDevices.getDisplayMedia = function (n) {
				return t(n).then((i) => {
					const o = n.video && n.video.width,
						s = n.video && n.video.height,
						c = n.video && n.video.frameRate;
					return (
						(n.video = {
							mandatory: {
								chromeMediaSource: 'desktop',
								chromeMediaSourceId: i,
								maxFrameRate: c || 3,
							},
						}),
						o && (n.video.mandatory.maxWidth = o),
						s && (n.video.mandatory.maxHeight = s),
						e.navigator.mediaDevices.getUserMedia(n)
					);
				});
			};
		}
	}
	function Fa(e) {
		e.MediaStream = e.MediaStream || e.webkitMediaStream;
	}
	function Ba(e) {
		if (
			typeof e == 'object' &&
			e.RTCPeerConnection &&
			!('ontrack' in e.RTCPeerConnection.prototype)
		) {
			Object.defineProperty(e.RTCPeerConnection.prototype, 'ontrack', {
				get() {
					return this._ontrack;
				},
				set(r) {
					this._ontrack && this.removeEventListener('track', this._ontrack),
						this.addEventListener('track', (this._ontrack = r));
				},
				enumerable: !0,
				configurable: !0,
			});
			const t = e.RTCPeerConnection.prototype.setRemoteDescription;
			e.RTCPeerConnection.prototype.setRemoteDescription = function () {
				return (
					this._ontrackpoly ||
						((this._ontrackpoly = (n) => {
							n.stream.addEventListener('addtrack', (i) => {
								let o;
								e.RTCPeerConnection.prototype.getReceivers
									? (o = this.getReceivers().find(
											(c) => c.track && c.track.id === i.track.id
									  ))
									: (o = { track: i.track });
								const s = new Event('track');
								(s.track = i.track),
									(s.receiver = o),
									(s.transceiver = { receiver: o }),
									(s.streams = [n.stream]),
									this.dispatchEvent(s);
							}),
								n.stream.getTracks().forEach((i) => {
									let o;
									e.RTCPeerConnection.prototype.getReceivers
										? (o = this.getReceivers().find(
												(c) => c.track && c.track.id === i.id
										  ))
										: (o = { track: i });
									const s = new Event('track');
									(s.track = i),
										(s.receiver = o),
										(s.transceiver = { receiver: o }),
										(s.streams = [n.stream]),
										this.dispatchEvent(s);
								});
						}),
						this.addEventListener('addstream', this._ontrackpoly)),
					t.apply(this, arguments)
				);
			};
		} else
			gr(
				e,
				'track',
				(t) => (
					t.transceiver ||
						Object.defineProperty(t, 'transceiver', {
							value: { receiver: t.receiver },
						}),
					t
				)
			);
	}
	function La(e) {
		if (
			typeof e == 'object' &&
			e.RTCPeerConnection &&
			!('getSenders' in e.RTCPeerConnection.prototype) &&
			'createDTMFSender' in e.RTCPeerConnection.prototype
		) {
			const t = function (i, o) {
				return {
					track: o,
					get dtmf() {
						return (
							this._dtmf === void 0 &&
								(o.kind === 'audio'
									? (this._dtmf = i.createDTMFSender(o))
									: (this._dtmf = null)),
							this._dtmf
						);
					},
					_pc: i,
				};
			};
			if (!e.RTCPeerConnection.prototype.getSenders) {
				e.RTCPeerConnection.prototype.getSenders = function () {
					return (this._senders = this._senders || []), this._senders.slice();
				};
				const i = e.RTCPeerConnection.prototype.addTrack;
				e.RTCPeerConnection.prototype.addTrack = function (c, a) {
					let l = i.apply(this, arguments);
					return l || ((l = t(this, c)), this._senders.push(l)), l;
				};
				const o = e.RTCPeerConnection.prototype.removeTrack;
				e.RTCPeerConnection.prototype.removeTrack = function (c) {
					o.apply(this, arguments);
					const a = this._senders.indexOf(c);
					a !== -1 && this._senders.splice(a, 1);
				};
			}
			const r = e.RTCPeerConnection.prototype.addStream;
			e.RTCPeerConnection.prototype.addStream = function (o) {
				(this._senders = this._senders || []),
					r.apply(this, [o]),
					o.getTracks().forEach((s) => {
						this._senders.push(t(this, s));
					});
			};
			const n = e.RTCPeerConnection.prototype.removeStream;
			e.RTCPeerConnection.prototype.removeStream = function (o) {
				(this._senders = this._senders || []),
					n.apply(this, [o]),
					o.getTracks().forEach((s) => {
						const c = this._senders.find((a) => a.track === s);
						c && this._senders.splice(this._senders.indexOf(c), 1);
					});
			};
		} else if (
			typeof e == 'object' &&
			e.RTCPeerConnection &&
			'getSenders' in e.RTCPeerConnection.prototype &&
			'createDTMFSender' in e.RTCPeerConnection.prototype &&
			e.RTCRtpSender &&
			!('dtmf' in e.RTCRtpSender.prototype)
		) {
			const t = e.RTCPeerConnection.prototype.getSenders;
			(e.RTCPeerConnection.prototype.getSenders = function () {
				const n = t.apply(this, []);
				return n.forEach((i) => (i._pc = this)), n;
			}),
				Object.defineProperty(e.RTCRtpSender.prototype, 'dtmf', {
					get() {
						return (
							this._dtmf === void 0 &&
								(this.track.kind === 'audio'
									? (this._dtmf = this._pc.createDTMFSender(this.track))
									: (this._dtmf = null)),
							this._dtmf
						);
					},
				});
		}
	}
	function $a(e) {
		if (!e.RTCPeerConnection) return;
		const t = e.RTCPeerConnection.prototype.getStats;
		e.RTCPeerConnection.prototype.getStats = function () {
			const [n, i, o] = arguments;
			if (arguments.length > 0 && typeof n == 'function')
				return t.apply(this, arguments);
			if (t.length === 0 && (arguments.length === 0 || typeof n != 'function'))
				return t.apply(this, []);
			const s = function (a) {
					const l = {};
					return (
						a.result().forEach((f) => {
							const d = {
								id: f.id,
								timestamp: f.timestamp,
								type:
									{
										localcandidate: 'local-candidate',
										remotecandidate: 'remote-candidate',
									}[f.type] || f.type,
							};
							f.names().forEach((h) => {
								d[h] = f.stat(h);
							}),
								(l[d.id] = d);
						}),
						l
					);
				},
				c = function (a) {
					return new Map(Object.keys(a).map((l) => [l, a[l]]));
				};
			if (arguments.length >= 2) {
				const a = function (l) {
					i(c(s(l)));
				};
				return t.apply(this, [a, n]);
			}
			return new Promise((a, l) => {
				t.apply(this, [
					function (u) {
						a(c(s(u)));
					},
					l,
				]);
			}).then(i, o);
		};
	}
	function Na(e) {
		if (
			!(
				typeof e == 'object' &&
				e.RTCPeerConnection &&
				e.RTCRtpSender &&
				e.RTCRtpReceiver
			)
		)
			return;
		if (!('getStats' in e.RTCRtpSender.prototype)) {
			const r = e.RTCPeerConnection.prototype.getSenders;
			r &&
				(e.RTCPeerConnection.prototype.getSenders = function () {
					const o = r.apply(this, []);
					return o.forEach((s) => (s._pc = this)), o;
				});
			const n = e.RTCPeerConnection.prototype.addTrack;
			n &&
				(e.RTCPeerConnection.prototype.addTrack = function () {
					const o = n.apply(this, arguments);
					return (o._pc = this), o;
				}),
				(e.RTCRtpSender.prototype.getStats = function () {
					const o = this;
					return this._pc.getStats().then((s) => Wo(s, o.track, !0));
				});
		}
		if (!('getStats' in e.RTCRtpReceiver.prototype)) {
			const r = e.RTCPeerConnection.prototype.getReceivers;
			r &&
				(e.RTCPeerConnection.prototype.getReceivers = function () {
					const i = r.apply(this, []);
					return i.forEach((o) => (o._pc = this)), i;
				}),
				gr(e, 'track', (n) => ((n.receiver._pc = n.srcElement), n)),
				(e.RTCRtpReceiver.prototype.getStats = function () {
					const i = this;
					return this._pc.getStats().then((o) => Wo(o, i.track, !1));
				});
		}
		if (
			!(
				'getStats' in e.RTCRtpSender.prototype &&
				'getStats' in e.RTCRtpReceiver.prototype
			)
		)
			return;
		const t = e.RTCPeerConnection.prototype.getStats;
		e.RTCPeerConnection.prototype.getStats = function () {
			if (arguments.length > 0 && arguments[0] instanceof e.MediaStreamTrack) {
				const n = arguments[0];
				let i, o, s;
				return (
					this.getSenders().forEach((c) => {
						c.track === n && (i ? (s = !0) : (i = c));
					}),
					this.getReceivers().forEach(
						(c) => (c.track === n && (o ? (s = !0) : (o = c)), c.track === n)
					),
					s || (i && o)
						? Promise.reject(
								new DOMException(
									'There are more than one sender or receiver for the track.',
									'InvalidAccessError'
								)
						  )
						: i
						? i.getStats()
						: o
						? o.getStats()
						: Promise.reject(
								new DOMException(
									'There is no sender or receiver for the track.',
									'InvalidAccessError'
								)
						  )
				);
			}
			return t.apply(this, arguments);
		};
	}
	function Ua(e) {
		e.RTCPeerConnection.prototype.getLocalStreams = function () {
			return (
				(this._shimmedLocalStreams = this._shimmedLocalStreams || {}),
				Object.keys(this._shimmedLocalStreams).map(
					(s) => this._shimmedLocalStreams[s][0]
				)
			);
		};
		const t = e.RTCPeerConnection.prototype.addTrack;
		e.RTCPeerConnection.prototype.addTrack = function (s, c) {
			if (!c) return t.apply(this, arguments);
			this._shimmedLocalStreams = this._shimmedLocalStreams || {};
			const a = t.apply(this, arguments);
			return (
				this._shimmedLocalStreams[c.id]
					? this._shimmedLocalStreams[c.id].indexOf(a) === -1 &&
					  this._shimmedLocalStreams[c.id].push(a)
					: (this._shimmedLocalStreams[c.id] = [c, a]),
				a
			);
		};
		const r = e.RTCPeerConnection.prototype.addStream;
		e.RTCPeerConnection.prototype.addStream = function (s) {
			(this._shimmedLocalStreams = this._shimmedLocalStreams || {}),
				s.getTracks().forEach((l) => {
					if (this.getSenders().find((f) => f.track === l))
						throw new DOMException(
							'Track already exists.',
							'InvalidAccessError'
						);
				});
			const c = this.getSenders();
			r.apply(this, arguments);
			const a = this.getSenders().filter((l) => c.indexOf(l) === -1);
			this._shimmedLocalStreams[s.id] = [s].concat(a);
		};
		const n = e.RTCPeerConnection.prototype.removeStream;
		e.RTCPeerConnection.prototype.removeStream = function (s) {
			return (
				(this._shimmedLocalStreams = this._shimmedLocalStreams || {}),
				delete this._shimmedLocalStreams[s.id],
				n.apply(this, arguments)
			);
		};
		const i = e.RTCPeerConnection.prototype.removeTrack;
		e.RTCPeerConnection.prototype.removeTrack = function (s) {
			return (
				(this._shimmedLocalStreams = this._shimmedLocalStreams || {}),
				s &&
					Object.keys(this._shimmedLocalStreams).forEach((c) => {
						const a = this._shimmedLocalStreams[c].indexOf(s);
						a !== -1 && this._shimmedLocalStreams[c].splice(a, 1),
							this._shimmedLocalStreams[c].length === 1 &&
								delete this._shimmedLocalStreams[c];
					}),
				i.apply(this, arguments)
			);
		};
	}
	function Ga(e, t) {
		if (!e.RTCPeerConnection) return;
		if (e.RTCPeerConnection.prototype.addTrack && t.version >= 65) return Ua(e);
		const r = e.RTCPeerConnection.prototype.getLocalStreams;
		e.RTCPeerConnection.prototype.getLocalStreams = function () {
			const u = r.apply(this);
			return (
				(this._reverseStreams = this._reverseStreams || {}),
				u.map((f) => this._reverseStreams[f.id])
			);
		};
		const n = e.RTCPeerConnection.prototype.addStream;
		e.RTCPeerConnection.prototype.addStream = function (u) {
			if (
				((this._streams = this._streams || {}),
				(this._reverseStreams = this._reverseStreams || {}),
				u.getTracks().forEach((f) => {
					if (this.getSenders().find((h) => h.track === f))
						throw new DOMException(
							'Track already exists.',
							'InvalidAccessError'
						);
				}),
				!this._reverseStreams[u.id])
			) {
				const f = new e.MediaStream(u.getTracks());
				(this._streams[u.id] = f), (this._reverseStreams[f.id] = u), (u = f);
			}
			n.apply(this, [u]);
		};
		const i = e.RTCPeerConnection.prototype.removeStream;
		(e.RTCPeerConnection.prototype.removeStream = function (u) {
			(this._streams = this._streams || {}),
				(this._reverseStreams = this._reverseStreams || {}),
				i.apply(this, [this._streams[u.id] || u]),
				delete this._reverseStreams[
					this._streams[u.id] ? this._streams[u.id].id : u.id
				],
				delete this._streams[u.id];
		}),
			(e.RTCPeerConnection.prototype.addTrack = function (u, f) {
				if (this.signalingState === 'closed')
					throw new DOMException(
						"The RTCPeerConnection's signalingState is 'closed'.",
						'InvalidStateError'
					);
				const d = [].slice.call(arguments, 1);
				if (d.length !== 1 || !d[0].getTracks().find((_) => _ === u))
					throw new DOMException(
						'The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.',
						'NotSupportedError'
					);
				if (this.getSenders().find((_) => _.track === u))
					throw new DOMException('Track already exists.', 'InvalidAccessError');
				(this._streams = this._streams || {}),
					(this._reverseStreams = this._reverseStreams || {});
				const g = this._streams[f.id];
				if (g)
					g.addTrack(u),
						Promise.resolve().then(() => {
							this.dispatchEvent(new Event('negotiationneeded'));
						});
				else {
					const _ = new e.MediaStream([u]);
					(this._streams[f.id] = _),
						(this._reverseStreams[_.id] = f),
						this.addStream(_);
				}
				return this.getSenders().find((_) => _.track === u);
			});
		function o(l, u) {
			let f = u.sdp;
			return (
				Object.keys(l._reverseStreams || []).forEach((d) => {
					const h = l._reverseStreams[d],
						g = l._streams[h.id];
					f = f.replace(new RegExp(g.id, 'g'), h.id);
				}),
				new RTCSessionDescription({ type: u.type, sdp: f })
			);
		}
		function s(l, u) {
			let f = u.sdp;
			return (
				Object.keys(l._reverseStreams || []).forEach((d) => {
					const h = l._reverseStreams[d],
						g = l._streams[h.id];
					f = f.replace(new RegExp(h.id, 'g'), g.id);
				}),
				new RTCSessionDescription({ type: u.type, sdp: f })
			);
		}
		['createOffer', 'createAnswer'].forEach(function (l) {
			const u = e.RTCPeerConnection.prototype[l],
				f = {
					[l]() {
						const d = arguments;
						return arguments.length && typeof arguments[0] == 'function'
							? u.apply(this, [
									(g) => {
										const _ = o(this, g);
										d[0].apply(null, [_]);
									},
									(g) => {
										d[1] && d[1].apply(null, g);
									},
									arguments[2],
							  ])
							: u.apply(this, arguments).then((g) => o(this, g));
					},
				};
			e.RTCPeerConnection.prototype[l] = f[l];
		});
		const c = e.RTCPeerConnection.prototype.setLocalDescription;
		e.RTCPeerConnection.prototype.setLocalDescription = function () {
			return !arguments.length || !arguments[0].type
				? c.apply(this, arguments)
				: ((arguments[0] = s(this, arguments[0])), c.apply(this, arguments));
		};
		const a = Object.getOwnPropertyDescriptor(
			e.RTCPeerConnection.prototype,
			'localDescription'
		);
		Object.defineProperty(e.RTCPeerConnection.prototype, 'localDescription', {
			get() {
				const l = a.get.apply(this);
				return l.type === '' ? l : o(this, l);
			},
		}),
			(e.RTCPeerConnection.prototype.removeTrack = function (u) {
				if (this.signalingState === 'closed')
					throw new DOMException(
						"The RTCPeerConnection's signalingState is 'closed'.",
						'InvalidStateError'
					);
				if (!u._pc)
					throw new DOMException(
						'Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.',
						'TypeError'
					);
				if (!(u._pc === this))
					throw new DOMException(
						'Sender was not created by this connection.',
						'InvalidAccessError'
					);
				this._streams = this._streams || {};
				let d;
				Object.keys(this._streams).forEach((h) => {
					this._streams[h].getTracks().find((_) => u.track === _) &&
						(d = this._streams[h]);
				}),
					d &&
						(d.getTracks().length === 1
							? this.removeStream(this._reverseStreams[d.id])
							: d.removeTrack(u.track),
						this.dispatchEvent(new Event('negotiationneeded')));
			});
	}
	function mi(e, t) {
		!e.RTCPeerConnection &&
			e.webkitRTCPeerConnection &&
			(e.RTCPeerConnection = e.webkitRTCPeerConnection),
			!!e.RTCPeerConnection &&
				t.version < 53 &&
				[
					'setLocalDescription',
					'setRemoteDescription',
					'addIceCandidate',
				].forEach(function (r) {
					const n = e.RTCPeerConnection.prototype[r],
						i = {
							[r]() {
								return (
									(arguments[0] = new (
										r === 'addIceCandidate'
											? e.RTCIceCandidate
											: e.RTCSessionDescription
									)(arguments[0])),
									n.apply(this, arguments)
								);
							},
						};
					e.RTCPeerConnection.prototype[r] = i[r];
				});
	}
	function za(e, t) {
		gr(e, 'negotiationneeded', (r) => {
			const n = r.target;
			if (
				!(
					(t.version < 72 ||
						(n.getConfiguration &&
							n.getConfiguration().sdpSemantics === 'plan-b')) &&
					n.signalingState !== 'stable'
				)
			)
				return r;
		});
	}
	const Vo = Object.freeze(
		Object.defineProperty(
			{
				__proto__: null,
				shimMediaStream: Fa,
				shimOnTrack: Ba,
				shimGetSendersWithDtmf: La,
				shimGetStats: $a,
				shimSenderReceiverGetStats: Na,
				shimAddTrackRemoveTrackWithNative: Ua,
				shimAddTrackRemoveTrack: Ga,
				shimPeerConnection: mi,
				fixNegotiationNeeded: za,
				shimGetUserMedia: ja,
				shimGetDisplayMedia: md,
			},
			Symbol.toStringTag,
			{ value: 'Module' }
		)
	);
	function gd(e, t) {
		let r = !1;
		return (
			(e = JSON.parse(JSON.stringify(e))),
			e.filter((n) => {
				if (n && (n.urls || n.url)) {
					let i = n.urls || n.url;
					n.url && !n.urls && wn('RTCIceServer.url', 'RTCIceServer.urls');
					const o = typeof i == 'string';
					return (
						o && (i = [i]),
						(i = i.filter((s) => {
							if (s.indexOf('stun:') === 0) return !1;
							const c =
								s.startsWith('turn') &&
								!s.startsWith('turn:[') &&
								s.includes('transport=udp');
							return c && !r ? ((r = !0), !0) : c && !r;
						})),
						delete n.url,
						(n.urls = o ? i[0] : i),
						!!i.length
					);
				}
			})
		);
	}
	var Vi = { exports: {} };
	(function (e) {
		var t = {};
		(t.generateIdentifier = function () {
			return Math.random().toString(36).substr(2, 10);
		}),
			(t.localCName = t.generateIdentifier()),
			(t.splitLines = function (r) {
				return r
					.trim()
					.split(
						`
`
					)
					.map(function (n) {
						return n.trim();
					});
			}),
			(t.splitSections = function (r) {
				var n = r.split(`
m=`);
				return n.map(function (i, o) {
					return (
						(o > 0 ? 'm=' + i : i).trim() +
						`\r
`
					);
				});
			}),
			(t.getDescription = function (r) {
				var n = t.splitSections(r);
				return n && n[0];
			}),
			(t.getMediaSections = function (r) {
				var n = t.splitSections(r);
				return n.shift(), n;
			}),
			(t.matchPrefix = function (r, n) {
				return t.splitLines(r).filter(function (i) {
					return i.indexOf(n) === 0;
				});
			}),
			(t.parseCandidate = function (r) {
				var n;
				r.indexOf('a=candidate:') === 0
					? (n = r.substring(12).split(' '))
					: (n = r.substring(10).split(' '));
				for (
					var i = {
							foundation: n[0],
							component: parseInt(n[1], 10),
							protocol: n[2].toLowerCase(),
							priority: parseInt(n[3], 10),
							ip: n[4],
							address: n[4],
							port: parseInt(n[5], 10),
							type: n[7],
						},
						o = 8;
					o < n.length;
					o += 2
				)
					switch (n[o]) {
						case 'raddr':
							i.relatedAddress = n[o + 1];
							break;
						case 'rport':
							i.relatedPort = parseInt(n[o + 1], 10);
							break;
						case 'tcptype':
							i.tcpType = n[o + 1];
							break;
						case 'ufrag':
							(i.ufrag = n[o + 1]), (i.usernameFragment = n[o + 1]);
							break;
						default:
							i[n[o]] = n[o + 1];
							break;
					}
				return i;
			}),
			(t.writeCandidate = function (r) {
				var n = [];
				n.push(r.foundation),
					n.push(r.component),
					n.push(r.protocol.toUpperCase()),
					n.push(r.priority),
					n.push(r.address || r.ip),
					n.push(r.port);
				var i = r.type;
				return (
					n.push('typ'),
					n.push(i),
					i !== 'host' &&
						r.relatedAddress &&
						r.relatedPort &&
						(n.push('raddr'),
						n.push(r.relatedAddress),
						n.push('rport'),
						n.push(r.relatedPort)),
					r.tcpType &&
						r.protocol.toLowerCase() === 'tcp' &&
						(n.push('tcptype'), n.push(r.tcpType)),
					(r.usernameFragment || r.ufrag) &&
						(n.push('ufrag'), n.push(r.usernameFragment || r.ufrag)),
					'candidate:' + n.join(' ')
				);
			}),
			(t.parseIceOptions = function (r) {
				return r.substr(14).split(' ');
			}),
			(t.parseRtpMap = function (r) {
				var n = r.substr(9).split(' '),
					i = { payloadType: parseInt(n.shift(), 10) };
				return (
					(n = n[0].split('/')),
					(i.name = n[0]),
					(i.clockRate = parseInt(n[1], 10)),
					(i.channels = n.length === 3 ? parseInt(n[2], 10) : 1),
					(i.numChannels = i.channels),
					i
				);
			}),
			(t.writeRtpMap = function (r) {
				var n = r.payloadType;
				r.preferredPayloadType !== void 0 && (n = r.preferredPayloadType);
				var i = r.channels || r.numChannels || 1;
				return (
					'a=rtpmap:' +
					n +
					' ' +
					r.name +
					'/' +
					r.clockRate +
					(i !== 1 ? '/' + i : '') +
					`\r
`
				);
			}),
			(t.parseExtmap = function (r) {
				var n = r.substr(9).split(' ');
				return {
					id: parseInt(n[0], 10),
					direction: n[0].indexOf('/') > 0 ? n[0].split('/')[1] : 'sendrecv',
					uri: n[1],
				};
			}),
			(t.writeExtmap = function (r) {
				return (
					'a=extmap:' +
					(r.id || r.preferredId) +
					(r.direction && r.direction !== 'sendrecv' ? '/' + r.direction : '') +
					' ' +
					r.uri +
					`\r
`
				);
			}),
			(t.parseFmtp = function (r) {
				for (
					var n = {}, i, o = r.substr(r.indexOf(' ') + 1).split(';'), s = 0;
					s < o.length;
					s++
				)
					(i = o[s].trim().split('=')), (n[i[0].trim()] = i[1]);
				return n;
			}),
			(t.writeFmtp = function (r) {
				var n = '',
					i = r.payloadType;
				if (
					(r.preferredPayloadType !== void 0 && (i = r.preferredPayloadType),
					r.parameters && Object.keys(r.parameters).length)
				) {
					var o = [];
					Object.keys(r.parameters).forEach(function (s) {
						r.parameters[s] ? o.push(s + '=' + r.parameters[s]) : o.push(s);
					}),
						(n +=
							'a=fmtp:' +
							i +
							' ' +
							o.join(';') +
							`\r
`);
				}
				return n;
			}),
			(t.parseRtcpFb = function (r) {
				var n = r.substr(r.indexOf(' ') + 1).split(' ');
				return { type: n.shift(), parameter: n.join(' ') };
			}),
			(t.writeRtcpFb = function (r) {
				var n = '',
					i = r.payloadType;
				return (
					r.preferredPayloadType !== void 0 && (i = r.preferredPayloadType),
					r.rtcpFeedback &&
						r.rtcpFeedback.length &&
						r.rtcpFeedback.forEach(function (o) {
							n +=
								'a=rtcp-fb:' +
								i +
								' ' +
								o.type +
								(o.parameter && o.parameter.length ? ' ' + o.parameter : '') +
								`\r
`;
						}),
					n
				);
			}),
			(t.parseSsrcMedia = function (r) {
				var n = r.indexOf(' '),
					i = { ssrc: parseInt(r.substr(7, n - 7), 10) },
					o = r.indexOf(':', n);
				return (
					o > -1
						? ((i.attribute = r.substr(n + 1, o - n - 1)),
						  (i.value = r.substr(o + 1)))
						: (i.attribute = r.substr(n + 1)),
					i
				);
			}),
			(t.parseSsrcGroup = function (r) {
				var n = r.substr(13).split(' ');
				return {
					semantics: n.shift(),
					ssrcs: n.map(function (i) {
						return parseInt(i, 10);
					}),
				};
			}),
			(t.getMid = function (r) {
				var n = t.matchPrefix(r, 'a=mid:')[0];
				if (n) return n.substr(6);
			}),
			(t.parseFingerprint = function (r) {
				var n = r.substr(14).split(' ');
				return { algorithm: n[0].toLowerCase(), value: n[1] };
			}),
			(t.getDtlsParameters = function (r, n) {
				var i = t.matchPrefix(r + n, 'a=fingerprint:');
				return { role: 'auto', fingerprints: i.map(t.parseFingerprint) };
			}),
			(t.writeDtlsParameters = function (r, n) {
				var i =
					'a=setup:' +
					n +
					`\r
`;
				return (
					r.fingerprints.forEach(function (o) {
						i +=
							'a=fingerprint:' +
							o.algorithm +
							' ' +
							o.value +
							`\r
`;
					}),
					i
				);
			}),
			(t.parseCryptoLine = function (r) {
				var n = r.substr(9).split(' ');
				return {
					tag: parseInt(n[0], 10),
					cryptoSuite: n[1],
					keyParams: n[2],
					sessionParams: n.slice(3),
				};
			}),
			(t.writeCryptoLine = function (r) {
				return (
					'a=crypto:' +
					r.tag +
					' ' +
					r.cryptoSuite +
					' ' +
					(typeof r.keyParams == 'object'
						? t.writeCryptoKeyParams(r.keyParams)
						: r.keyParams) +
					(r.sessionParams ? ' ' + r.sessionParams.join(' ') : '') +
					`\r
`
				);
			}),
			(t.parseCryptoKeyParams = function (r) {
				if (r.indexOf('inline:') !== 0) return null;
				var n = r.substr(7).split('|');
				return {
					keyMethod: 'inline',
					keySalt: n[0],
					lifeTime: n[1],
					mkiValue: n[2] ? n[2].split(':')[0] : void 0,
					mkiLength: n[2] ? n[2].split(':')[1] : void 0,
				};
			}),
			(t.writeCryptoKeyParams = function (r) {
				return (
					r.keyMethod +
					':' +
					r.keySalt +
					(r.lifeTime ? '|' + r.lifeTime : '') +
					(r.mkiValue && r.mkiLength
						? '|' + r.mkiValue + ':' + r.mkiLength
						: '')
				);
			}),
			(t.getCryptoParameters = function (r, n) {
				var i = t.matchPrefix(r + n, 'a=crypto:');
				return i.map(t.parseCryptoLine);
			}),
			(t.getIceParameters = function (r, n) {
				var i = t.matchPrefix(r + n, 'a=ice-ufrag:')[0],
					o = t.matchPrefix(r + n, 'a=ice-pwd:')[0];
				return i && o
					? { usernameFragment: i.substr(12), password: o.substr(10) }
					: null;
			}),
			(t.writeIceParameters = function (r) {
				return (
					'a=ice-ufrag:' +
					r.usernameFragment +
					`\r
a=ice-pwd:` +
					r.password +
					`\r
`
				);
			}),
			(t.parseRtpParameters = function (r) {
				for (
					var n = {
							codecs: [],
							headerExtensions: [],
							fecMechanisms: [],
							rtcp: [],
						},
						i = t.splitLines(r),
						o = i[0].split(' '),
						s = 3;
					s < o.length;
					s++
				) {
					var c = o[s],
						a = t.matchPrefix(r, 'a=rtpmap:' + c + ' ')[0];
					if (a) {
						var l = t.parseRtpMap(a),
							u = t.matchPrefix(r, 'a=fmtp:' + c + ' ');
						switch (
							((l.parameters = u.length ? t.parseFmtp(u[0]) : {}),
							(l.rtcpFeedback = t
								.matchPrefix(r, 'a=rtcp-fb:' + c + ' ')
								.map(t.parseRtcpFb)),
							n.codecs.push(l),
							l.name.toUpperCase())
						) {
							case 'RED':
							case 'ULPFEC':
								n.fecMechanisms.push(l.name.toUpperCase());
								break;
						}
					}
				}
				return (
					t.matchPrefix(r, 'a=extmap:').forEach(function (f) {
						n.headerExtensions.push(t.parseExtmap(f));
					}),
					n
				);
			}),
			(t.writeRtpDescription = function (r, n) {
				var i = '';
				(i += 'm=' + r + ' '),
					(i += n.codecs.length > 0 ? '9' : '0'),
					(i += ' UDP/TLS/RTP/SAVPF '),
					(i +=
						n.codecs
							.map(function (s) {
								return s.preferredPayloadType !== void 0
									? s.preferredPayloadType
									: s.payloadType;
							})
							.join(' ') +
						`\r
`),
					(i += `c=IN IP4 0.0.0.0\r
`),
					(i += `a=rtcp:9 IN IP4 0.0.0.0\r
`),
					n.codecs.forEach(function (s) {
						(i += t.writeRtpMap(s)),
							(i += t.writeFmtp(s)),
							(i += t.writeRtcpFb(s));
					});
				var o = 0;
				return (
					n.codecs.forEach(function (s) {
						s.maxptime > o && (o = s.maxptime);
					}),
					o > 0 &&
						(i +=
							'a=maxptime:' +
							o +
							`\r
`),
					(i += `a=rtcp-mux\r
`),
					n.headerExtensions &&
						n.headerExtensions.forEach(function (s) {
							i += t.writeExtmap(s);
						}),
					i
				);
			}),
			(t.parseRtpEncodingParameters = function (r) {
				var n = [],
					i = t.parseRtpParameters(r),
					o = i.fecMechanisms.indexOf('RED') !== -1,
					s = i.fecMechanisms.indexOf('ULPFEC') !== -1,
					c = t
						.matchPrefix(r, 'a=ssrc:')
						.map(function (d) {
							return t.parseSsrcMedia(d);
						})
						.filter(function (d) {
							return d.attribute === 'cname';
						}),
					a = c.length > 0 && c[0].ssrc,
					l,
					u = t.matchPrefix(r, 'a=ssrc-group:FID').map(function (d) {
						var h = d.substr(17).split(' ');
						return h.map(function (g) {
							return parseInt(g, 10);
						});
					});
				u.length > 0 && u[0].length > 1 && u[0][0] === a && (l = u[0][1]),
					i.codecs.forEach(function (d) {
						if (d.name.toUpperCase() === 'RTX' && d.parameters.apt) {
							var h = {
								ssrc: a,
								codecPayloadType: parseInt(d.parameters.apt, 10),
							};
							a && l && (h.rtx = { ssrc: l }),
								n.push(h),
								o &&
									((h = JSON.parse(JSON.stringify(h))),
									(h.fec = { ssrc: a, mechanism: s ? 'red+ulpfec' : 'red' }),
									n.push(h));
						}
					}),
					n.length === 0 && a && n.push({ ssrc: a });
				var f = t.matchPrefix(r, 'b=');
				return (
					f.length &&
						(f[0].indexOf('b=TIAS:') === 0
							? (f = parseInt(f[0].substr(7), 10))
							: f[0].indexOf('b=AS:') === 0
							? (f = parseInt(f[0].substr(5), 10) * 1e3 * 0.95 - 50 * 40 * 8)
							: (f = void 0),
						n.forEach(function (d) {
							d.maxBitrate = f;
						})),
					n
				);
			}),
			(t.parseRtcpParameters = function (r) {
				var n = {},
					i = t
						.matchPrefix(r, 'a=ssrc:')
						.map(function (c) {
							return t.parseSsrcMedia(c);
						})
						.filter(function (c) {
							return c.attribute === 'cname';
						})[0];
				i && ((n.cname = i.value), (n.ssrc = i.ssrc));
				var o = t.matchPrefix(r, 'a=rtcp-rsize');
				(n.reducedSize = o.length > 0), (n.compound = o.length === 0);
				var s = t.matchPrefix(r, 'a=rtcp-mux');
				return (n.mux = s.length > 0), n;
			}),
			(t.parseMsid = function (r) {
				var n,
					i = t.matchPrefix(r, 'a=msid:');
				if (i.length === 1)
					return (n = i[0].substr(7).split(' ')), { stream: n[0], track: n[1] };
				var o = t
					.matchPrefix(r, 'a=ssrc:')
					.map(function (s) {
						return t.parseSsrcMedia(s);
					})
					.filter(function (s) {
						return s.attribute === 'msid';
					});
				if (o.length > 0)
					return (n = o[0].value.split(' ')), { stream: n[0], track: n[1] };
			}),
			(t.parseSctpDescription = function (r) {
				var n = t.parseMLine(r),
					i = t.matchPrefix(r, 'a=max-message-size:'),
					o;
				i.length > 0 && (o = parseInt(i[0].substr(19), 10)),
					isNaN(o) && (o = 65536);
				var s = t.matchPrefix(r, 'a=sctp-port:');
				if (s.length > 0)
					return {
						port: parseInt(s[0].substr(12), 10),
						protocol: n.fmt,
						maxMessageSize: o,
					};
				var c = t.matchPrefix(r, 'a=sctpmap:');
				if (c.length > 0) {
					var a = t.matchPrefix(r, 'a=sctpmap:')[0].substr(10).split(' ');
					return {
						port: parseInt(a[0], 10),
						protocol: a[1],
						maxMessageSize: o,
					};
				}
			}),
			(t.writeSctpDescription = function (r, n) {
				var i = [];
				return (
					r.protocol !== 'DTLS/SCTP'
						? (i = [
								'm=' +
									r.kind +
									' 9 ' +
									r.protocol +
									' ' +
									n.protocol +
									`\r
`,
								`c=IN IP4 0.0.0.0\r
`,
								'a=sctp-port:' +
									n.port +
									`\r
`,
						  ])
						: (i = [
								'm=' +
									r.kind +
									' 9 ' +
									r.protocol +
									' ' +
									n.port +
									`\r
`,
								`c=IN IP4 0.0.0.0\r
`,
								'a=sctpmap:' +
									n.port +
									' ' +
									n.protocol +
									` 65535\r
`,
						  ]),
					n.maxMessageSize !== void 0 &&
						i.push(
							'a=max-message-size:' +
								n.maxMessageSize +
								`\r
`
						),
					i.join('')
				);
			}),
			(t.generateSessionId = function () {
				return Math.random().toString().substr(2, 21);
			}),
			(t.writeSessionBoilerplate = function (r, n, i) {
				var o,
					s = n !== void 0 ? n : 2;
				r ? (o = r) : (o = t.generateSessionId());
				var c = i || 'thisisadapterortc';
				return (
					`v=0\r
o=` +
					c +
					' ' +
					o +
					' ' +
					s +
					` IN IP4 127.0.0.1\r
s=-\r
t=0 0\r
`
				);
			}),
			(t.writeMediaSection = function (r, n, i, o) {
				var s = t.writeRtpDescription(r.kind, n);
				if (
					((s += t.writeIceParameters(r.iceGatherer.getLocalParameters())),
					(s += t.writeDtlsParameters(
						r.dtlsTransport.getLocalParameters(),
						i === 'offer' ? 'actpass' : 'active'
					)),
					(s +=
						'a=mid:' +
						r.mid +
						`\r
`),
					r.direction
						? (s +=
								'a=' +
								r.direction +
								`\r
`)
						: r.rtpSender && r.rtpReceiver
						? (s += `a=sendrecv\r
`)
						: r.rtpSender
						? (s += `a=sendonly\r
`)
						: r.rtpReceiver
						? (s += `a=recvonly\r
`)
						: (s += `a=inactive\r
`),
					r.rtpSender)
				) {
					var c =
						'msid:' +
						o.id +
						' ' +
						r.rtpSender.track.id +
						`\r
`;
					(s += 'a=' + c),
						(s += 'a=ssrc:' + r.sendEncodingParameters[0].ssrc + ' ' + c),
						r.sendEncodingParameters[0].rtx &&
							((s +=
								'a=ssrc:' + r.sendEncodingParameters[0].rtx.ssrc + ' ' + c),
							(s +=
								'a=ssrc-group:FID ' +
								r.sendEncodingParameters[0].ssrc +
								' ' +
								r.sendEncodingParameters[0].rtx.ssrc +
								`\r
`));
				}
				return (
					(s +=
						'a=ssrc:' +
						r.sendEncodingParameters[0].ssrc +
						' cname:' +
						t.localCName +
						`\r
`),
					r.rtpSender &&
						r.sendEncodingParameters[0].rtx &&
						(s +=
							'a=ssrc:' +
							r.sendEncodingParameters[0].rtx.ssrc +
							' cname:' +
							t.localCName +
							`\r
`),
					s
				);
			}),
			(t.getDirection = function (r, n) {
				for (var i = t.splitLines(r), o = 0; o < i.length; o++)
					switch (i[o]) {
						case 'a=sendrecv':
						case 'a=sendonly':
						case 'a=recvonly':
						case 'a=inactive':
							return i[o].substr(2);
					}
				return n ? t.getDirection(n) : 'sendrecv';
			}),
			(t.getKind = function (r) {
				var n = t.splitLines(r),
					i = n[0].split(' ');
				return i[0].substr(2);
			}),
			(t.isRejected = function (r) {
				return r.split(' ', 2)[1] === '0';
			}),
			(t.parseMLine = function (r) {
				var n = t.splitLines(r),
					i = n[0].substr(2).split(' ');
				return {
					kind: i[0],
					port: parseInt(i[1], 10),
					protocol: i[2],
					fmt: i.slice(3).join(' '),
				};
			}),
			(t.parseOLine = function (r) {
				var n = t.matchPrefix(r, 'o=')[0],
					i = n.substr(2).split(' ');
				return {
					username: i[0],
					sessionId: i[1],
					sessionVersion: parseInt(i[2], 10),
					netType: i[3],
					addressType: i[4],
					address: i[5],
				};
			}),
			(t.isValidSDP = function (r) {
				if (typeof r != 'string' || r.length === 0) return !1;
				for (var n = t.splitLines(r), i = 0; i < n.length; i++)
					if (n[i].length < 2 || n[i].charAt(1) !== '=') return !1;
				return !0;
			}),
			(e.exports = t);
	})(Vi);
	const tn = Vi.exports;
	var V = Vi.exports;
	function vd(e) {
		return (
			{
				inboundrtp: 'inbound-rtp',
				outboundrtp: 'outbound-rtp',
				candidatepair: 'candidate-pair',
				localcandidate: 'local-candidate',
				remotecandidate: 'remote-candidate',
			}[e.type] || e.type
		);
	}
	function Jo(e, t, r, n, i) {
		var o = V.writeRtpDescription(e.kind, t);
		if (
			((o += V.writeIceParameters(e.iceGatherer.getLocalParameters())),
			(o += V.writeDtlsParameters(
				e.dtlsTransport.getLocalParameters(),
				r === 'offer' ? 'actpass' : i || 'active'
			)),
			(o +=
				'a=mid:' +
				e.mid +
				`\r
`),
			e.rtpSender && e.rtpReceiver
				? (o += `a=sendrecv\r
`)
				: e.rtpSender
				? (o += `a=sendonly\r
`)
				: e.rtpReceiver
				? (o += `a=recvonly\r
`)
				: (o += `a=inactive\r
`),
			e.rtpSender)
		) {
			var s = e.rtpSender._initialTrackId || e.rtpSender.track.id;
			e.rtpSender._initialTrackId = s;
			var c =
				'msid:' +
				(n ? n.id : '-') +
				' ' +
				s +
				`\r
`;
			(o += 'a=' + c),
				(o += 'a=ssrc:' + e.sendEncodingParameters[0].ssrc + ' ' + c),
				e.sendEncodingParameters[0].rtx &&
					((o += 'a=ssrc:' + e.sendEncodingParameters[0].rtx.ssrc + ' ' + c),
					(o +=
						'a=ssrc-group:FID ' +
						e.sendEncodingParameters[0].ssrc +
						' ' +
						e.sendEncodingParameters[0].rtx.ssrc +
						`\r
`));
		}
		return (
			(o +=
				'a=ssrc:' +
				e.sendEncodingParameters[0].ssrc +
				' cname:' +
				V.localCName +
				`\r
`),
			e.rtpSender &&
				e.sendEncodingParameters[0].rtx &&
				(o +=
					'a=ssrc:' +
					e.sendEncodingParameters[0].rtx.ssrc +
					' cname:' +
					V.localCName +
					`\r
`),
			o
		);
	}
	function yd(e, t) {
		var r = !1;
		return (
			(e = JSON.parse(JSON.stringify(e))),
			e.filter(function (n) {
				if (n && (n.urls || n.url)) {
					var i = n.urls || n.url;
					n.url &&
						!n.urls &&
						console.warn('RTCIceServer.url is deprecated! Use urls instead.');
					var o = typeof i == 'string';
					return (
						o && (i = [i]),
						(i = i.filter(function (s) {
							var c =
								s.indexOf('turn:') === 0 &&
								s.indexOf('transport=udp') !== -1 &&
								s.indexOf('turn:[') === -1 &&
								!r;
							return c
								? ((r = !0), !0)
								: s.indexOf('stun:') === 0 &&
										t >= 14393 &&
										s.indexOf('?transport=udp') === -1;
						})),
						delete n.url,
						(n.urls = o ? i[0] : i),
						!!i.length
					);
				}
			})
		);
	}
	function qr(e, t) {
		var r = { codecs: [], headerExtensions: [], fecMechanisms: [] },
			n = function (o, s) {
				o = parseInt(o, 10);
				for (var c = 0; c < s.length; c++)
					if (s[c].payloadType === o || s[c].preferredPayloadType === o)
						return s[c];
			},
			i = function (o, s, c, a) {
				var l = n(o.parameters.apt, c),
					u = n(s.parameters.apt, a);
				return l && u && l.name.toLowerCase() === u.name.toLowerCase();
			};
		return (
			e.codecs.forEach(function (o) {
				for (var s = 0; s < t.codecs.length; s++) {
					var c = t.codecs[s];
					if (
						o.name.toLowerCase() === c.name.toLowerCase() &&
						o.clockRate === c.clockRate
					) {
						if (
							o.name.toLowerCase() === 'rtx' &&
							o.parameters &&
							c.parameters.apt &&
							!i(o, c, e.codecs, t.codecs)
						)
							continue;
						(c = JSON.parse(JSON.stringify(c))),
							(c.numChannels = Math.min(o.numChannels, c.numChannels)),
							r.codecs.push(c),
							(c.rtcpFeedback = c.rtcpFeedback.filter(function (a) {
								for (var l = 0; l < o.rtcpFeedback.length; l++)
									if (
										o.rtcpFeedback[l].type === a.type &&
										o.rtcpFeedback[l].parameter === a.parameter
									)
										return !0;
								return !1;
							}));
						break;
					}
				}
			}),
			e.headerExtensions.forEach(function (o) {
				for (var s = 0; s < t.headerExtensions.length; s++) {
					var c = t.headerExtensions[s];
					if (o.uri === c.uri) {
						r.headerExtensions.push(c);
						break;
					}
				}
			}),
			r
		);
	}
	function Ko(e, t, r) {
		return (
			{
				offer: {
					setLocalDescription: ['stable', 'have-local-offer'],
					setRemoteDescription: ['stable', 'have-remote-offer'],
				},
				answer: {
					setLocalDescription: ['have-remote-offer', 'have-local-pranswer'],
					setRemoteDescription: ['have-local-offer', 'have-remote-pranswer'],
				},
			}[t][e].indexOf(r) !== -1
		);
	}
	function zn(e, t) {
		var r = e.getRemoteCandidates().find(function (n) {
			return (
				t.foundation === n.foundation &&
				t.ip === n.ip &&
				t.port === n.port &&
				t.priority === n.priority &&
				t.protocol === n.protocol &&
				t.type === n.type
			);
		});
		return r || e.addRemoteCandidate(t), !r;
	}
	function Ae(e, t) {
		var r = new Error(t);
		return (
			(r.name = e),
			(r.code = {
				NotSupportedError: 9,
				InvalidStateError: 11,
				InvalidAccessError: 15,
				TypeError: void 0,
				OperationError: void 0,
			}[e]),
			r
		);
	}
	var _d = function (e, t) {
		function r(a, l) {
			l.addTrack(a),
				l.dispatchEvent(new e.MediaStreamTrackEvent('addtrack', { track: a }));
		}
		function n(a, l) {
			l.removeTrack(a),
				l.dispatchEvent(
					new e.MediaStreamTrackEvent('removetrack', { track: a })
				);
		}
		function i(a, l, u, f) {
			var d = new Event('track');
			(d.track = l),
				(d.receiver = u),
				(d.transceiver = { receiver: u }),
				(d.streams = f),
				e.setTimeout(function () {
					a._dispatchEvent('track', d);
				});
		}
		var o = function (a) {
			var l = this,
				u = document.createDocumentFragment();
			if (
				(['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(
					function (d) {
						l[d] = u[d].bind(u);
					}
				),
				(this.canTrickleIceCandidates = null),
				(this.needNegotiation = !1),
				(this.localStreams = []),
				(this.remoteStreams = []),
				(this._localDescription = null),
				(this._remoteDescription = null),
				(this.signalingState = 'stable'),
				(this.iceConnectionState = 'new'),
				(this.connectionState = 'new'),
				(this.iceGatheringState = 'new'),
				(a = JSON.parse(JSON.stringify(a || {}))),
				(this.usingBundle = a.bundlePolicy === 'max-bundle'),
				a.rtcpMuxPolicy === 'negotiate')
			)
				throw Ae(
					'NotSupportedError',
					"rtcpMuxPolicy 'negotiate' is not supported"
				);
			switch (
				(a.rtcpMuxPolicy || (a.rtcpMuxPolicy = 'require'), a.iceTransportPolicy)
			) {
				case 'all':
				case 'relay':
					break;
				default:
					a.iceTransportPolicy = 'all';
					break;
			}
			switch (a.bundlePolicy) {
				case 'balanced':
				case 'max-compat':
				case 'max-bundle':
					break;
				default:
					a.bundlePolicy = 'balanced';
					break;
			}
			if (
				((a.iceServers = yd(a.iceServers || [], t)),
				(this._iceGatherers = []),
				a.iceCandidatePoolSize)
			)
				for (var f = a.iceCandidatePoolSize; f > 0; f--)
					this._iceGatherers.push(
						new e.RTCIceGatherer({
							iceServers: a.iceServers,
							gatherPolicy: a.iceTransportPolicy,
						})
					);
			else a.iceCandidatePoolSize = 0;
			(this._config = a),
				(this.transceivers = []),
				(this._sdpSessionId = V.generateSessionId()),
				(this._sdpSessionVersion = 0),
				(this._dtlsRole = void 0),
				(this._isClosed = !1);
		};
		Object.defineProperty(o.prototype, 'localDescription', {
			configurable: !0,
			get: function () {
				return this._localDescription;
			},
		}),
			Object.defineProperty(o.prototype, 'remoteDescription', {
				configurable: !0,
				get: function () {
					return this._remoteDescription;
				},
			}),
			(o.prototype.onicecandidate = null),
			(o.prototype.onaddstream = null),
			(o.prototype.ontrack = null),
			(o.prototype.onremovestream = null),
			(o.prototype.onsignalingstatechange = null),
			(o.prototype.oniceconnectionstatechange = null),
			(o.prototype.onconnectionstatechange = null),
			(o.prototype.onicegatheringstatechange = null),
			(o.prototype.onnegotiationneeded = null),
			(o.prototype.ondatachannel = null),
			(o.prototype._dispatchEvent = function (a, l) {
				this._isClosed ||
					(this.dispatchEvent(l),
					typeof this['on' + a] == 'function' && this['on' + a](l));
			}),
			(o.prototype._emitGatheringStateChange = function () {
				var a = new Event('icegatheringstatechange');
				this._dispatchEvent('icegatheringstatechange', a);
			}),
			(o.prototype.getConfiguration = function () {
				return this._config;
			}),
			(o.prototype.getLocalStreams = function () {
				return this.localStreams;
			}),
			(o.prototype.getRemoteStreams = function () {
				return this.remoteStreams;
			}),
			(o.prototype._createTransceiver = function (a, l) {
				var u = this.transceivers.length > 0,
					f = {
						track: null,
						iceGatherer: null,
						iceTransport: null,
						dtlsTransport: null,
						localCapabilities: null,
						remoteCapabilities: null,
						rtpSender: null,
						rtpReceiver: null,
						kind: a,
						mid: null,
						sendEncodingParameters: null,
						recvEncodingParameters: null,
						stream: null,
						associatedRemoteMediaStreams: [],
						wantReceive: !0,
					};
				if (this.usingBundle && u)
					(f.iceTransport = this.transceivers[0].iceTransport),
						(f.dtlsTransport = this.transceivers[0].dtlsTransport);
				else {
					var d = this._createIceAndDtlsTransports();
					(f.iceTransport = d.iceTransport),
						(f.dtlsTransport = d.dtlsTransport);
				}
				return l || this.transceivers.push(f), f;
			}),
			(o.prototype.addTrack = function (a, l) {
				if (this._isClosed)
					throw Ae(
						'InvalidStateError',
						'Attempted to call addTrack on a closed peerconnection.'
					);
				var u = this.transceivers.find(function (h) {
					return h.track === a;
				});
				if (u) throw Ae('InvalidAccessError', 'Track already exists.');
				for (var f, d = 0; d < this.transceivers.length; d++)
					!this.transceivers[d].track &&
						this.transceivers[d].kind === a.kind &&
						(f = this.transceivers[d]);
				return (
					f || (f = this._createTransceiver(a.kind)),
					this._maybeFireNegotiationNeeded(),
					this.localStreams.indexOf(l) === -1 && this.localStreams.push(l),
					(f.track = a),
					(f.stream = l),
					(f.rtpSender = new e.RTCRtpSender(a, f.dtlsTransport)),
					f.rtpSender
				);
			}),
			(o.prototype.addStream = function (a) {
				var l = this;
				if (t >= 15025)
					a.getTracks().forEach(function (f) {
						l.addTrack(f, a);
					});
				else {
					var u = a.clone();
					a.getTracks().forEach(function (f, d) {
						var h = u.getTracks()[d];
						f.addEventListener('enabled', function (g) {
							h.enabled = g.enabled;
						});
					}),
						u.getTracks().forEach(function (f) {
							l.addTrack(f, u);
						});
				}
			}),
			(o.prototype.removeTrack = function (a) {
				if (this._isClosed)
					throw Ae(
						'InvalidStateError',
						'Attempted to call removeTrack on a closed peerconnection.'
					);
				if (!(a instanceof e.RTCRtpSender))
					throw new TypeError(
						'Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.'
					);
				var l = this.transceivers.find(function (d) {
					return d.rtpSender === a;
				});
				if (!l)
					throw Ae(
						'InvalidAccessError',
						'Sender was not created by this connection.'
					);
				var u = l.stream;
				l.rtpSender.stop(),
					(l.rtpSender = null),
					(l.track = null),
					(l.stream = null);
				var f = this.transceivers.map(function (d) {
					return d.stream;
				});
				f.indexOf(u) === -1 &&
					this.localStreams.indexOf(u) > -1 &&
					this.localStreams.splice(this.localStreams.indexOf(u), 1),
					this._maybeFireNegotiationNeeded();
			}),
			(o.prototype.removeStream = function (a) {
				var l = this;
				a.getTracks().forEach(function (u) {
					var f = l.getSenders().find(function (d) {
						return d.track === u;
					});
					f && l.removeTrack(f);
				});
			}),
			(o.prototype.getSenders = function () {
				return this.transceivers
					.filter(function (a) {
						return !!a.rtpSender;
					})
					.map(function (a) {
						return a.rtpSender;
					});
			}),
			(o.prototype.getReceivers = function () {
				return this.transceivers
					.filter(function (a) {
						return !!a.rtpReceiver;
					})
					.map(function (a) {
						return a.rtpReceiver;
					});
			}),
			(o.prototype._createIceGatherer = function (a, l) {
				var u = this;
				if (l && a > 0) return this.transceivers[0].iceGatherer;
				if (this._iceGatherers.length) return this._iceGatherers.shift();
				var f = new e.RTCIceGatherer({
					iceServers: this._config.iceServers,
					gatherPolicy: this._config.iceTransportPolicy,
				});
				return (
					Object.defineProperty(f, 'state', { value: 'new', writable: !0 }),
					(this.transceivers[a].bufferedCandidateEvents = []),
					(this.transceivers[a].bufferCandidates = function (d) {
						var h = !d.candidate || Object.keys(d.candidate).length === 0;
						(f.state = h ? 'completed' : 'gathering'),
							u.transceivers[a].bufferedCandidateEvents !== null &&
								u.transceivers[a].bufferedCandidateEvents.push(d);
					}),
					f.addEventListener(
						'localcandidate',
						this.transceivers[a].bufferCandidates
					),
					f
				);
			}),
			(o.prototype._gather = function (a, l) {
				var u = this,
					f = this.transceivers[l].iceGatherer;
				if (!f.onlocalcandidate) {
					var d = this.transceivers[l].bufferedCandidateEvents;
					(this.transceivers[l].bufferedCandidateEvents = null),
						f.removeEventListener(
							'localcandidate',
							this.transceivers[l].bufferCandidates
						),
						(f.onlocalcandidate = function (h) {
							if (!(u.usingBundle && l > 0)) {
								var g = new Event('icecandidate');
								g.candidate = { sdpMid: a, sdpMLineIndex: l };
								var _ = h.candidate,
									R = !_ || Object.keys(_).length === 0;
								if (R)
									(f.state === 'new' || f.state === 'gathering') &&
										(f.state = 'completed');
								else {
									f.state === 'new' && (f.state = 'gathering'),
										(_.component = 1),
										(_.ufrag = f.getLocalParameters().usernameFragment);
									var S = V.writeCandidate(_);
									(g.candidate = Object.assign(
										g.candidate,
										V.parseCandidate(S)
									)),
										(g.candidate.candidate = S),
										(g.candidate.toJSON = function () {
											return {
												candidate: g.candidate.candidate,
												sdpMid: g.candidate.sdpMid,
												sdpMLineIndex: g.candidate.sdpMLineIndex,
												usernameFragment: g.candidate.usernameFragment,
											};
										});
								}
								var j = V.getMediaSections(u._localDescription.sdp);
								R
									? (j[g.candidate.sdpMLineIndex] += `a=end-of-candidates\r
`)
									: (j[g.candidate.sdpMLineIndex] +=
											'a=' +
											g.candidate.candidate +
											`\r
`),
									(u._localDescription.sdp =
										V.getDescription(u._localDescription.sdp) + j.join(''));
								var D = u.transceivers.every(function (b) {
									return b.iceGatherer && b.iceGatherer.state === 'completed';
								});
								u.iceGatheringState !== 'gathering' &&
									((u.iceGatheringState = 'gathering'),
									u._emitGatheringStateChange()),
									R || u._dispatchEvent('icecandidate', g),
									D &&
										(u._dispatchEvent(
											'icecandidate',
											new Event('icecandidate')
										),
										(u.iceGatheringState = 'complete'),
										u._emitGatheringStateChange());
							}
						}),
						e.setTimeout(function () {
							d.forEach(function (h) {
								f.onlocalcandidate(h);
							});
						}, 0);
				}
			}),
			(o.prototype._createIceAndDtlsTransports = function () {
				var a = this,
					l = new e.RTCIceTransport(null);
				l.onicestatechange = function () {
					a._updateIceConnectionState(), a._updateConnectionState();
				};
				var u = new e.RTCDtlsTransport(l);
				return (
					(u.ondtlsstatechange = function () {
						a._updateConnectionState();
					}),
					(u.onerror = function () {
						Object.defineProperty(u, 'state', {
							value: 'failed',
							writable: !0,
						}),
							a._updateConnectionState();
					}),
					{ iceTransport: l, dtlsTransport: u }
				);
			}),
			(o.prototype._disposeIceAndDtlsTransports = function (a) {
				var l = this.transceivers[a].iceGatherer;
				l &&
					(delete l.onlocalcandidate, delete this.transceivers[a].iceGatherer);
				var u = this.transceivers[a].iceTransport;
				u &&
					(delete u.onicestatechange, delete this.transceivers[a].iceTransport);
				var f = this.transceivers[a].dtlsTransport;
				f &&
					(delete f.ondtlsstatechange,
					delete f.onerror,
					delete this.transceivers[a].dtlsTransport);
			}),
			(o.prototype._transceive = function (a, l, u) {
				var f = qr(a.localCapabilities, a.remoteCapabilities);
				l &&
					a.rtpSender &&
					((f.encodings = a.sendEncodingParameters),
					(f.rtcp = {
						cname: V.localCName,
						compound: a.rtcpParameters.compound,
					}),
					a.recvEncodingParameters.length &&
						(f.rtcp.ssrc = a.recvEncodingParameters[0].ssrc),
					a.rtpSender.send(f)),
					u &&
						a.rtpReceiver &&
						f.codecs.length > 0 &&
						(a.kind === 'video' &&
							a.recvEncodingParameters &&
							t < 15019 &&
							a.recvEncodingParameters.forEach(function (d) {
								delete d.rtx;
							}),
						a.recvEncodingParameters.length
							? (f.encodings = a.recvEncodingParameters)
							: (f.encodings = [{}]),
						(f.rtcp = { compound: a.rtcpParameters.compound }),
						a.rtcpParameters.cname && (f.rtcp.cname = a.rtcpParameters.cname),
						a.sendEncodingParameters.length &&
							(f.rtcp.ssrc = a.sendEncodingParameters[0].ssrc),
						a.rtpReceiver.receive(f));
			}),
			(o.prototype.setLocalDescription = function (a) {
				var l = this;
				if (['offer', 'answer'].indexOf(a.type) === -1)
					return Promise.reject(
						Ae('TypeError', 'Unsupported type "' + a.type + '"')
					);
				if (!Ko('setLocalDescription', a.type, l.signalingState) || l._isClosed)
					return Promise.reject(
						Ae(
							'InvalidStateError',
							'Can not set local ' + a.type + ' in state ' + l.signalingState
						)
					);
				var u, f;
				if (a.type === 'offer')
					(u = V.splitSections(a.sdp)),
						(f = u.shift()),
						u.forEach(function (h, g) {
							var _ = V.parseRtpParameters(h);
							l.transceivers[g].localCapabilities = _;
						}),
						l.transceivers.forEach(function (h, g) {
							l._gather(h.mid, g);
						});
				else if (a.type === 'answer') {
					(u = V.splitSections(l._remoteDescription.sdp)), (f = u.shift());
					var d = V.matchPrefix(f, 'a=ice-lite').length > 0;
					u.forEach(function (h, g) {
						var _ = l.transceivers[g],
							R = _.iceGatherer,
							S = _.iceTransport,
							j = _.dtlsTransport,
							D = _.localCapabilities,
							b = _.remoteCapabilities,
							P =
								V.isRejected(h) &&
								V.matchPrefix(h, 'a=bundle-only').length === 0;
						if (!P && !_.rejected) {
							var W = V.getIceParameters(h, f),
								A = V.getDtlsParameters(h, f);
							d && (A.role = 'server'),
								(!l.usingBundle || g === 0) &&
									(l._gather(_.mid, g),
									S.state === 'new' &&
										S.start(R, W, d ? 'controlling' : 'controlled'),
									j.state === 'new' && j.start(A));
							var E = qr(D, b);
							l._transceive(_, E.codecs.length > 0, !1);
						}
					});
				}
				return (
					(l._localDescription = { type: a.type, sdp: a.sdp }),
					a.type === 'offer'
						? l._updateSignalingState('have-local-offer')
						: l._updateSignalingState('stable'),
					Promise.resolve()
				);
			}),
			(o.prototype.setRemoteDescription = function (a) {
				var l = this;
				if (['offer', 'answer'].indexOf(a.type) === -1)
					return Promise.reject(
						Ae('TypeError', 'Unsupported type "' + a.type + '"')
					);
				if (
					!Ko('setRemoteDescription', a.type, l.signalingState) ||
					l._isClosed
				)
					return Promise.reject(
						Ae(
							'InvalidStateError',
							'Can not set remote ' + a.type + ' in state ' + l.signalingState
						)
					);
				var u = {};
				l.remoteStreams.forEach(function (S) {
					u[S.id] = S;
				});
				var f = [],
					d = V.splitSections(a.sdp),
					h = d.shift(),
					g = V.matchPrefix(h, 'a=ice-lite').length > 0,
					_ = V.matchPrefix(h, 'a=group:BUNDLE ').length > 0;
				l.usingBundle = _;
				var R = V.matchPrefix(h, 'a=ice-options:')[0];
				return (
					R
						? (l.canTrickleIceCandidates =
								R.substr(14).split(' ').indexOf('trickle') >= 0)
						: (l.canTrickleIceCandidates = !1),
					d.forEach(function (S, j) {
						var D = V.splitLines(S),
							b = V.getKind(S),
							P =
								V.isRejected(S) &&
								V.matchPrefix(S, 'a=bundle-only').length === 0,
							W = D[0].substr(2).split(' ')[2],
							A = V.getDirection(S, h),
							E = V.parseMsid(S),
							B = V.getMid(S) || V.generateIdentifier();
						if (
							P ||
							(b === 'application' &&
								(W === 'DTLS/SCTP' || W === 'UDP/DTLS/SCTP'))
						) {
							l.transceivers[j] = {
								mid: B,
								kind: b,
								protocol: W,
								rejected: !0,
							};
							return;
						}
						!P &&
							l.transceivers[j] &&
							l.transceivers[j].rejected &&
							(l.transceivers[j] = l._createTransceiver(b, !0));
						var w,
							te,
							ge,
							Q,
							y,
							v,
							G,
							N,
							$,
							Z = V.parseRtpParameters(S),
							ee,
							ne;
						P ||
							((ee = V.getIceParameters(S, h)),
							(ne = V.getDtlsParameters(S, h)),
							(ne.role = 'client')),
							(G = V.parseRtpEncodingParameters(S));
						var ce = V.parseRtcpParameters(S),
							Se = V.matchPrefix(S, 'a=end-of-candidates', h).length > 0,
							le = V.matchPrefix(S, 'a=candidate:')
								.map(function (be) {
									return V.parseCandidate(be);
								})
								.filter(function (be) {
									return be.component === 1;
								});
						if (
							((a.type === 'offer' || a.type === 'answer') &&
								!P &&
								_ &&
								j > 0 &&
								l.transceivers[j] &&
								(l._disposeIceAndDtlsTransports(j),
								(l.transceivers[j].iceGatherer = l.transceivers[0].iceGatherer),
								(l.transceivers[j].iceTransport =
									l.transceivers[0].iceTransport),
								(l.transceivers[j].dtlsTransport =
									l.transceivers[0].dtlsTransport),
								l.transceivers[j].rtpSender &&
									l.transceivers[j].rtpSender.setTransport(
										l.transceivers[0].dtlsTransport
									),
								l.transceivers[j].rtpReceiver &&
									l.transceivers[j].rtpReceiver.setTransport(
										l.transceivers[0].dtlsTransport
									)),
							a.type === 'offer' && !P)
						) {
							(w = l.transceivers[j] || l._createTransceiver(b)),
								(w.mid = B),
								w.iceGatherer || (w.iceGatherer = l._createIceGatherer(j, _)),
								le.length &&
									w.iceTransport.state === 'new' &&
									(Se && (!_ || j === 0)
										? w.iceTransport.setRemoteCandidates(le)
										: le.forEach(function (be) {
												zn(w.iceTransport, be);
										  })),
								(N = e.RTCRtpReceiver.getCapabilities(b)),
								t < 15019 &&
									(N.codecs = N.codecs.filter(function (be) {
										return be.name !== 'rtx';
									})),
								(v = w.sendEncodingParameters || [
									{ ssrc: (2 * j + 2) * 1001 },
								]);
							var Je = !1;
							if (A === 'sendrecv' || A === 'sendonly') {
								if (
									((Je = !w.rtpReceiver),
									(y =
										w.rtpReceiver || new e.RTCRtpReceiver(w.dtlsTransport, b)),
									Je)
								) {
									var Te;
									($ = y.track),
										(E && E.stream === '-') ||
											(E
												? (u[E.stream] ||
														((u[E.stream] = new e.MediaStream()),
														Object.defineProperty(u[E.stream], 'id', {
															get: function () {
																return E.stream;
															},
														})),
												  Object.defineProperty($, 'id', {
														get: function () {
															return E.track;
														},
												  }),
												  (Te = u[E.stream]))
												: (u.default || (u.default = new e.MediaStream()),
												  (Te = u.default))),
										Te && (r($, Te), w.associatedRemoteMediaStreams.push(Te)),
										f.push([$, y, Te]);
								}
							} else
								w.rtpReceiver &&
									w.rtpReceiver.track &&
									(w.associatedRemoteMediaStreams.forEach(function (be) {
										var Ie = be.getTracks().find(function (st) {
											return st.id === w.rtpReceiver.track.id;
										});
										Ie && n(Ie, be);
									}),
									(w.associatedRemoteMediaStreams = []));
							(w.localCapabilities = N),
								(w.remoteCapabilities = Z),
								(w.rtpReceiver = y),
								(w.rtcpParameters = ce),
								(w.sendEncodingParameters = v),
								(w.recvEncodingParameters = G),
								l._transceive(l.transceivers[j], !1, Je);
						} else if (a.type === 'answer' && !P) {
							(w = l.transceivers[j]),
								(te = w.iceGatherer),
								(ge = w.iceTransport),
								(Q = w.dtlsTransport),
								(y = w.rtpReceiver),
								(v = w.sendEncodingParameters),
								(N = w.localCapabilities),
								(l.transceivers[j].recvEncodingParameters = G),
								(l.transceivers[j].remoteCapabilities = Z),
								(l.transceivers[j].rtcpParameters = ce),
								le.length &&
									ge.state === 'new' &&
									((g || Se) && (!_ || j === 0)
										? ge.setRemoteCandidates(le)
										: le.forEach(function (be) {
												zn(w.iceTransport, be);
										  })),
								(!_ || j === 0) &&
									(ge.state === 'new' && ge.start(te, ee, 'controlling'),
									Q.state === 'new' && Q.start(ne));
							var ie = qr(w.localCapabilities, w.remoteCapabilities),
								ot = ie.codecs.filter(function (be) {
									return be.name.toLowerCase() === 'rtx';
								}).length;
							!ot &&
								w.sendEncodingParameters[0].rtx &&
								delete w.sendEncodingParameters[0].rtx,
								l._transceive(
									w,
									A === 'sendrecv' || A === 'recvonly',
									A === 'sendrecv' || A === 'sendonly'
								),
								y && (A === 'sendrecv' || A === 'sendonly')
									? (($ = y.track),
									  E
											? (u[E.stream] || (u[E.stream] = new e.MediaStream()),
											  r($, u[E.stream]),
											  f.push([$, y, u[E.stream]]))
											: (u.default || (u.default = new e.MediaStream()),
											  r($, u.default),
											  f.push([$, y, u.default])))
									: delete w.rtpReceiver;
						}
					}),
					l._dtlsRole === void 0 &&
						(l._dtlsRole = a.type === 'offer' ? 'active' : 'passive'),
					(l._remoteDescription = { type: a.type, sdp: a.sdp }),
					a.type === 'offer'
						? l._updateSignalingState('have-remote-offer')
						: l._updateSignalingState('stable'),
					Object.keys(u).forEach(function (S) {
						var j = u[S];
						if (j.getTracks().length) {
							if (l.remoteStreams.indexOf(j) === -1) {
								l.remoteStreams.push(j);
								var D = new Event('addstream');
								(D.stream = j),
									e.setTimeout(function () {
										l._dispatchEvent('addstream', D);
									});
							}
							f.forEach(function (b) {
								var P = b[0],
									W = b[1];
								j.id === b[2].id && i(l, P, W, [j]);
							});
						}
					}),
					f.forEach(function (S) {
						S[2] || i(l, S[0], S[1], []);
					}),
					e.setTimeout(function () {
						!(l && l.transceivers) ||
							l.transceivers.forEach(function (S) {
								S.iceTransport &&
									S.iceTransport.state === 'new' &&
									S.iceTransport.getRemoteCandidates().length > 0 &&
									(console.warn(
										'Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification'
									),
									S.iceTransport.addRemoteCandidate({}));
							});
					}, 4e3),
					Promise.resolve()
				);
			}),
			(o.prototype.close = function () {
				this.transceivers.forEach(function (a) {
					a.iceTransport && a.iceTransport.stop(),
						a.dtlsTransport && a.dtlsTransport.stop(),
						a.rtpSender && a.rtpSender.stop(),
						a.rtpReceiver && a.rtpReceiver.stop();
				}),
					(this._isClosed = !0),
					this._updateSignalingState('closed');
			}),
			(o.prototype._updateSignalingState = function (a) {
				this.signalingState = a;
				var l = new Event('signalingstatechange');
				this._dispatchEvent('signalingstatechange', l);
			}),
			(o.prototype._maybeFireNegotiationNeeded = function () {
				var a = this;
				this.signalingState !== 'stable' ||
					this.needNegotiation === !0 ||
					((this.needNegotiation = !0),
					e.setTimeout(function () {
						if (a.needNegotiation) {
							a.needNegotiation = !1;
							var l = new Event('negotiationneeded');
							a._dispatchEvent('negotiationneeded', l);
						}
					}, 0));
			}),
			(o.prototype._updateIceConnectionState = function () {
				var a,
					l = {
						new: 0,
						closed: 0,
						checking: 0,
						connected: 0,
						completed: 0,
						disconnected: 0,
						failed: 0,
					};
				if (
					(this.transceivers.forEach(function (f) {
						f.iceTransport && !f.rejected && l[f.iceTransport.state]++;
					}),
					(a = 'new'),
					l.failed > 0
						? (a = 'failed')
						: l.checking > 0
						? (a = 'checking')
						: l.disconnected > 0
						? (a = 'disconnected')
						: l.new > 0
						? (a = 'new')
						: l.connected > 0
						? (a = 'connected')
						: l.completed > 0 && (a = 'completed'),
					a !== this.iceConnectionState)
				) {
					this.iceConnectionState = a;
					var u = new Event('iceconnectionstatechange');
					this._dispatchEvent('iceconnectionstatechange', u);
				}
			}),
			(o.prototype._updateConnectionState = function () {
				var a,
					l = {
						new: 0,
						closed: 0,
						connecting: 0,
						connected: 0,
						completed: 0,
						disconnected: 0,
						failed: 0,
					};
				if (
					(this.transceivers.forEach(function (f) {
						f.iceTransport &&
							f.dtlsTransport &&
							!f.rejected &&
							(l[f.iceTransport.state]++, l[f.dtlsTransport.state]++);
					}),
					(l.connected += l.completed),
					(a = 'new'),
					l.failed > 0
						? (a = 'failed')
						: l.connecting > 0
						? (a = 'connecting')
						: l.disconnected > 0
						? (a = 'disconnected')
						: l.new > 0
						? (a = 'new')
						: l.connected > 0 && (a = 'connected'),
					a !== this.connectionState)
				) {
					this.connectionState = a;
					var u = new Event('connectionstatechange');
					this._dispatchEvent('connectionstatechange', u);
				}
			}),
			(o.prototype.createOffer = function () {
				var a = this;
				if (a._isClosed)
					return Promise.reject(
						Ae('InvalidStateError', 'Can not call createOffer after close')
					);
				var l = a.transceivers.filter(function (g) {
						return g.kind === 'audio';
					}).length,
					u = a.transceivers.filter(function (g) {
						return g.kind === 'video';
					}).length,
					f = arguments[0];
				if (f) {
					if (f.mandatory || f.optional)
						throw new TypeError(
							'Legacy mandatory/optional constraints not supported.'
						);
					f.offerToReceiveAudio !== void 0 &&
						(f.offerToReceiveAudio === !0
							? (l = 1)
							: f.offerToReceiveAudio === !1
							? (l = 0)
							: (l = f.offerToReceiveAudio)),
						f.offerToReceiveVideo !== void 0 &&
							(f.offerToReceiveVideo === !0
								? (u = 1)
								: f.offerToReceiveVideo === !1
								? (u = 0)
								: (u = f.offerToReceiveVideo));
				}
				for (
					a.transceivers.forEach(function (g) {
						g.kind === 'audio'
							? (l--, l < 0 && (g.wantReceive = !1))
							: g.kind === 'video' && (u--, u < 0 && (g.wantReceive = !1));
					});
					l > 0 || u > 0;

				)
					l > 0 && (a._createTransceiver('audio'), l--),
						u > 0 && (a._createTransceiver('video'), u--);
				var d = V.writeSessionBoilerplate(
					a._sdpSessionId,
					a._sdpSessionVersion++
				);
				a.transceivers.forEach(function (g, _) {
					var R = g.track,
						S = g.kind,
						j = g.mid || V.generateIdentifier();
					(g.mid = j),
						g.iceGatherer ||
							(g.iceGatherer = a._createIceGatherer(_, a.usingBundle));
					var D = e.RTCRtpSender.getCapabilities(S);
					t < 15019 &&
						(D.codecs = D.codecs.filter(function (P) {
							return P.name !== 'rtx';
						})),
						D.codecs.forEach(function (P) {
							P.name === 'H264' &&
								P.parameters['level-asymmetry-allowed'] === void 0 &&
								(P.parameters['level-asymmetry-allowed'] = '1'),
								g.remoteCapabilities &&
									g.remoteCapabilities.codecs &&
									g.remoteCapabilities.codecs.forEach(function (W) {
										P.name.toLowerCase() === W.name.toLowerCase() &&
											P.clockRate === W.clockRate &&
											(P.preferredPayloadType = W.payloadType);
									});
						}),
						D.headerExtensions.forEach(function (P) {
							var W =
								(g.remoteCapabilities &&
									g.remoteCapabilities.headerExtensions) ||
								[];
							W.forEach(function (A) {
								P.uri === A.uri && (P.id = A.id);
							});
						});
					var b = g.sendEncodingParameters || [{ ssrc: (2 * _ + 1) * 1001 }];
					R &&
						t >= 15019 &&
						S === 'video' &&
						!b[0].rtx &&
						(b[0].rtx = { ssrc: b[0].ssrc + 1 }),
						g.wantReceive &&
							(g.rtpReceiver = new e.RTCRtpReceiver(g.dtlsTransport, S)),
						(g.localCapabilities = D),
						(g.sendEncodingParameters = b);
				}),
					a._config.bundlePolicy !== 'max-compat' &&
						(d +=
							'a=group:BUNDLE ' +
							a.transceivers
								.map(function (g) {
									return g.mid;
								})
								.join(' ') +
							`\r
`),
					(d += `a=ice-options:trickle\r
`),
					a.transceivers.forEach(function (g, _) {
						(d += Jo(g, g.localCapabilities, 'offer', g.stream, a._dtlsRole)),
							(d += `a=rtcp-rsize\r
`),
							g.iceGatherer &&
								a.iceGatheringState !== 'new' &&
								(_ === 0 || !a.usingBundle) &&
								(g.iceGatherer.getLocalCandidates().forEach(function (R) {
									(R.component = 1),
										(d +=
											'a=' +
											V.writeCandidate(R) +
											`\r
`);
								}),
								g.iceGatherer.state === 'completed' &&
									(d += `a=end-of-candidates\r
`));
					});
				var h = new e.RTCSessionDescription({ type: 'offer', sdp: d });
				return Promise.resolve(h);
			}),
			(o.prototype.createAnswer = function () {
				var a = this;
				if (a._isClosed)
					return Promise.reject(
						Ae('InvalidStateError', 'Can not call createAnswer after close')
					);
				if (
					!(
						a.signalingState === 'have-remote-offer' ||
						a.signalingState === 'have-local-pranswer'
					)
				)
					return Promise.reject(
						Ae(
							'InvalidStateError',
							'Can not call createAnswer in signalingState ' + a.signalingState
						)
					);
				var l = V.writeSessionBoilerplate(
					a._sdpSessionId,
					a._sdpSessionVersion++
				);
				a.usingBundle &&
					(l +=
						'a=group:BUNDLE ' +
						a.transceivers
							.map(function (d) {
								return d.mid;
							})
							.join(' ') +
						`\r
`),
					(l += `a=ice-options:trickle\r
`);
				var u = V.getMediaSections(a._remoteDescription.sdp).length;
				a.transceivers.forEach(function (d, h) {
					if (!(h + 1 > u)) {
						if (d.rejected) {
							d.kind === 'application'
								? d.protocol === 'DTLS/SCTP'
									? (l += `m=application 0 DTLS/SCTP 5000\r
`)
									: (l +=
											'm=application 0 ' +
											d.protocol +
											` webrtc-datachannel\r
`)
								: d.kind === 'audio'
								? (l += `m=audio 0 UDP/TLS/RTP/SAVPF 0\r
a=rtpmap:0 PCMU/8000\r
`)
								: d.kind === 'video' &&
								  (l += `m=video 0 UDP/TLS/RTP/SAVPF 120\r
a=rtpmap:120 VP8/90000\r
`),
								(l +=
									`c=IN IP4 0.0.0.0\r
a=inactive\r
a=mid:` +
									d.mid +
									`\r
`);
							return;
						}
						if (d.stream) {
							var g;
							d.kind === 'audio'
								? (g = d.stream.getAudioTracks()[0])
								: d.kind === 'video' && (g = d.stream.getVideoTracks()[0]),
								g &&
									t >= 15019 &&
									d.kind === 'video' &&
									!d.sendEncodingParameters[0].rtx &&
									(d.sendEncodingParameters[0].rtx = {
										ssrc: d.sendEncodingParameters[0].ssrc + 1,
									});
						}
						var _ = qr(d.localCapabilities, d.remoteCapabilities),
							R = _.codecs.filter(function (S) {
								return S.name.toLowerCase() === 'rtx';
							}).length;
						!R &&
							d.sendEncodingParameters[0].rtx &&
							delete d.sendEncodingParameters[0].rtx,
							(l += Jo(d, _, 'answer', d.stream, a._dtlsRole)),
							d.rtcpParameters &&
								d.rtcpParameters.reducedSize &&
								(l += `a=rtcp-rsize\r
`);
					}
				});
				var f = new e.RTCSessionDescription({ type: 'answer', sdp: l });
				return Promise.resolve(f);
			}),
			(o.prototype.addIceCandidate = function (a) {
				var l = this,
					u;
				return a && !(a.sdpMLineIndex !== void 0 || a.sdpMid)
					? Promise.reject(new TypeError('sdpMLineIndex or sdpMid required'))
					: new Promise(function (f, d) {
							if (l._remoteDescription)
								if (!a || a.candidate === '')
									for (
										var h = 0;
										h < l.transceivers.length &&
										!(
											!l.transceivers[h].rejected &&
											(l.transceivers[h].iceTransport.addRemoteCandidate({}),
											(u = V.getMediaSections(l._remoteDescription.sdp)),
											(u[h] += `a=end-of-candidates\r
`),
											(l._remoteDescription.sdp =
												V.getDescription(l._remoteDescription.sdp) +
												u.join('')),
											l.usingBundle)
										);
										h++
									);
								else {
									var g = a.sdpMLineIndex;
									if (a.sdpMid) {
										for (var _ = 0; _ < l.transceivers.length; _++)
											if (l.transceivers[_].mid === a.sdpMid) {
												g = _;
												break;
											}
									}
									var R = l.transceivers[g];
									if (R) {
										if (R.rejected) return f();
										var S =
											Object.keys(a.candidate).length > 0
												? V.parseCandidate(a.candidate)
												: {};
										if (
											(S.protocol === 'tcp' &&
												(S.port === 0 || S.port === 9)) ||
											(S.component && S.component !== 1)
										)
											return f();
										if (
											(g === 0 ||
												(g > 0 &&
													R.iceTransport !== l.transceivers[0].iceTransport)) &&
											!zn(R.iceTransport, S)
										)
											return d(
												Ae('OperationError', 'Can not add ICE candidate')
											);
										var j = a.candidate.trim();
										j.indexOf('a=') === 0 && (j = j.substr(2)),
											(u = V.getMediaSections(l._remoteDescription.sdp)),
											(u[g] +=
												'a=' +
												(S.type ? j : 'end-of-candidates') +
												`\r
`),
											(l._remoteDescription.sdp =
												V.getDescription(l._remoteDescription.sdp) +
												u.join(''));
									} else
										return d(Ae('OperationError', 'Can not add ICE candidate'));
								}
							else
								return d(
									Ae(
										'InvalidStateError',
										'Can not add ICE candidate without a remote description'
									)
								);
							f();
					  });
			}),
			(o.prototype.getStats = function (a) {
				if (a && a instanceof e.MediaStreamTrack) {
					var l = null;
					if (
						(this.transceivers.forEach(function (f) {
							f.rtpSender && f.rtpSender.track === a
								? (l = f.rtpSender)
								: f.rtpReceiver &&
								  f.rtpReceiver.track === a &&
								  (l = f.rtpReceiver);
						}),
						!l)
					)
						throw Ae('InvalidAccessError', 'Invalid selector.');
					return l.getStats();
				}
				var u = [];
				return (
					this.transceivers.forEach(function (f) {
						[
							'rtpSender',
							'rtpReceiver',
							'iceGatherer',
							'iceTransport',
							'dtlsTransport',
						].forEach(function (d) {
							f[d] && u.push(f[d].getStats());
						});
					}),
					Promise.all(u).then(function (f) {
						var d = new Map();
						return (
							f.forEach(function (h) {
								h.forEach(function (g) {
									d.set(g.id, g);
								});
							}),
							d
						);
					})
				);
			});
		var s = [
			'RTCRtpSender',
			'RTCRtpReceiver',
			'RTCIceGatherer',
			'RTCIceTransport',
			'RTCDtlsTransport',
		];
		s.forEach(function (a) {
			var l = e[a];
			if (l && l.prototype && l.prototype.getStats) {
				var u = l.prototype.getStats;
				l.prototype.getStats = function () {
					return u.apply(this).then(function (f) {
						var d = new Map();
						return (
							Object.keys(f).forEach(function (h) {
								(f[h].type = vd(f[h])), d.set(h, f[h]);
							}),
							d
						);
					});
				};
			}
		});
		var c = ['createOffer', 'createAnswer'];
		return (
			c.forEach(function (a) {
				var l = o.prototype[a];
				o.prototype[a] = function () {
					var u = arguments;
					return typeof u[0] == 'function' || typeof u[1] == 'function'
						? l.apply(this, [arguments[2]]).then(
								function (f) {
									typeof u[0] == 'function' && u[0].apply(null, [f]);
								},
								function (f) {
									typeof u[1] == 'function' && u[1].apply(null, [f]);
								}
						  )
						: l.apply(this, arguments);
				};
			}),
			(c = ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']),
			c.forEach(function (a) {
				var l = o.prototype[a];
				o.prototype[a] = function () {
					var u = arguments;
					return typeof u[1] == 'function' || typeof u[2] == 'function'
						? l.apply(this, arguments).then(
								function () {
									typeof u[1] == 'function' && u[1].apply(null);
								},
								function (f) {
									typeof u[2] == 'function' && u[2].apply(null, [f]);
								}
						  )
						: l.apply(this, arguments);
				};
			}),
			['getStats'].forEach(function (a) {
				var l = o.prototype[a];
				o.prototype[a] = function () {
					var u = arguments;
					return typeof u[1] == 'function'
						? l.apply(this, arguments).then(function () {
								typeof u[1] == 'function' && u[1].apply(null);
						  })
						: l.apply(this, arguments);
				};
			}),
			o
		);
	};
	function Wa(e) {
		const t = e && e.navigator,
			r = function (i) {
				return {
					name: { PermissionDeniedError: 'NotAllowedError' }[i.name] || i.name,
					message: i.message,
					constraint: i.constraint,
					toString() {
						return this.name;
					},
				};
			},
			n = t.mediaDevices.getUserMedia.bind(t.mediaDevices);
		t.mediaDevices.getUserMedia = function (i) {
			return n(i).catch((o) => Promise.reject(r(o)));
		};
	}
	function Ha(e) {
		'getDisplayMedia' in e.navigator &&
			(!e.navigator.mediaDevices ||
				(e.navigator.mediaDevices &&
					'getDisplayMedia' in e.navigator.mediaDevices) ||
				(e.navigator.mediaDevices.getDisplayMedia =
					e.navigator.getDisplayMedia.bind(e.navigator)));
	}
	function gi(e, t) {
		if (
			e.RTCIceGatherer &&
			(e.RTCIceCandidate ||
				(e.RTCIceCandidate = function (i) {
					return i;
				}),
			e.RTCSessionDescription ||
				(e.RTCSessionDescription = function (i) {
					return i;
				}),
			t.version < 15025)
		) {
			const n = Object.getOwnPropertyDescriptor(
				e.MediaStreamTrack.prototype,
				'enabled'
			);
			Object.defineProperty(e.MediaStreamTrack.prototype, 'enabled', {
				set(i) {
					n.set.call(this, i);
					const o = new Event('enabled');
					(o.enabled = i), this.dispatchEvent(o);
				},
			});
		}
		e.RTCRtpSender &&
			!('dtmf' in e.RTCRtpSender.prototype) &&
			Object.defineProperty(e.RTCRtpSender.prototype, 'dtmf', {
				get() {
					return (
						this._dtmf === void 0 &&
							(this.track.kind === 'audio'
								? (this._dtmf = new e.RTCDtmfSender(this))
								: this.track.kind === 'video' && (this._dtmf = null)),
						this._dtmf
					);
				},
			}),
			e.RTCDtmfSender &&
				!e.RTCDTMFSender &&
				(e.RTCDTMFSender = e.RTCDtmfSender);
		const r = _d(e, t.version);
		(e.RTCPeerConnection = function (i) {
			return (
				i &&
					i.iceServers &&
					((i.iceServers = gd(i.iceServers, t.version)),
					Hi('ICE servers after filtering:', i.iceServers)),
				new r(i)
			);
		}),
			(e.RTCPeerConnection.prototype = r.prototype);
	}
	function Va(e) {
		e.RTCRtpSender &&
			!('replaceTrack' in e.RTCRtpSender.prototype) &&
			(e.RTCRtpSender.prototype.replaceTrack =
				e.RTCRtpSender.prototype.setTrack);
	}
	const qo = Object.freeze(
		Object.defineProperty(
			{
				__proto__: null,
				shimPeerConnection: gi,
				shimReplaceTrack: Va,
				shimGetUserMedia: Wa,
				shimGetDisplayMedia: Ha,
			},
			Symbol.toStringTag,
			{ value: 'Module' }
		)
	);
	function Ja(e, t) {
		const r = e && e.navigator,
			n = e && e.MediaStreamTrack;
		if (
			((r.getUserMedia = function (i, o, s) {
				wn('navigator.getUserMedia', 'navigator.mediaDevices.getUserMedia'),
					r.mediaDevices.getUserMedia(i).then(o, s);
			}),
			!(
				t.version > 55 &&
				'autoGainControl' in r.mediaDevices.getSupportedConstraints()
			))
		) {
			const i = function (s, c, a) {
					c in s && !(a in s) && ((s[a] = s[c]), delete s[c]);
				},
				o = r.mediaDevices.getUserMedia.bind(r.mediaDevices);
			if (
				((r.mediaDevices.getUserMedia = function (s) {
					return (
						typeof s == 'object' &&
							typeof s.audio == 'object' &&
							((s = JSON.parse(JSON.stringify(s))),
							i(s.audio, 'autoGainControl', 'mozAutoGainControl'),
							i(s.audio, 'noiseSuppression', 'mozNoiseSuppression')),
						o(s)
					);
				}),
				n && n.prototype.getSettings)
			) {
				const s = n.prototype.getSettings;
				n.prototype.getSettings = function () {
					const c = s.apply(this, arguments);
					return (
						i(c, 'mozAutoGainControl', 'autoGainControl'),
						i(c, 'mozNoiseSuppression', 'noiseSuppression'),
						c
					);
				};
			}
			if (n && n.prototype.applyConstraints) {
				const s = n.prototype.applyConstraints;
				n.prototype.applyConstraints = function (c) {
					return (
						this.kind === 'audio' &&
							typeof c == 'object' &&
							((c = JSON.parse(JSON.stringify(c))),
							i(c, 'autoGainControl', 'mozAutoGainControl'),
							i(c, 'noiseSuppression', 'mozNoiseSuppression')),
						s.apply(this, [c])
					);
				};
			}
		}
	}
	function bd(e, t) {
		(e.navigator.mediaDevices &&
			'getDisplayMedia' in e.navigator.mediaDevices) ||
			!e.navigator.mediaDevices ||
			(e.navigator.mediaDevices.getDisplayMedia = function (n) {
				if (!(n && n.video)) {
					const i = new DOMException(
						'getDisplayMedia without video constraints is undefined'
					);
					return (i.name = 'NotFoundError'), (i.code = 8), Promise.reject(i);
				}
				return (
					n.video === !0
						? (n.video = { mediaSource: t })
						: (n.video.mediaSource = t),
					e.navigator.mediaDevices.getUserMedia(n)
				);
			});
	}
	function Ka(e) {
		typeof e == 'object' &&
			e.RTCTrackEvent &&
			'receiver' in e.RTCTrackEvent.prototype &&
			!('transceiver' in e.RTCTrackEvent.prototype) &&
			Object.defineProperty(e.RTCTrackEvent.prototype, 'transceiver', {
				get() {
					return { receiver: this.receiver };
				},
			});
	}
	function vi(e, t) {
		if (
			typeof e != 'object' ||
			!(e.RTCPeerConnection || e.mozRTCPeerConnection)
		)
			return;
		!e.RTCPeerConnection &&
			e.mozRTCPeerConnection &&
			(e.RTCPeerConnection = e.mozRTCPeerConnection),
			t.version < 53 &&
				[
					'setLocalDescription',
					'setRemoteDescription',
					'addIceCandidate',
				].forEach(function (i) {
					const o = e.RTCPeerConnection.prototype[i],
						s = {
							[i]() {
								return (
									(arguments[0] = new (
										i === 'addIceCandidate'
											? e.RTCIceCandidate
											: e.RTCSessionDescription
									)(arguments[0])),
									o.apply(this, arguments)
								);
							},
						};
					e.RTCPeerConnection.prototype[i] = s[i];
				});
		const r = {
				inboundrtp: 'inbound-rtp',
				outboundrtp: 'outbound-rtp',
				candidatepair: 'candidate-pair',
				localcandidate: 'local-candidate',
				remotecandidate: 'remote-candidate',
			},
			n = e.RTCPeerConnection.prototype.getStats;
		e.RTCPeerConnection.prototype.getStats = function () {
			const [o, s, c] = arguments;
			return n
				.apply(this, [o || null])
				.then((a) => {
					if (t.version < 53 && !s)
						try {
							a.forEach((l) => {
								l.type = r[l.type] || l.type;
							});
						} catch (l) {
							if (l.name !== 'TypeError') throw l;
							a.forEach((u, f) => {
								a.set(f, Object.assign({}, u, { type: r[u.type] || u.type }));
							});
						}
					return a;
				})
				.then(s, c);
		};
	}
	function qa(e) {
		if (
			!(typeof e == 'object' && e.RTCPeerConnection && e.RTCRtpSender) ||
			(e.RTCRtpSender && 'getStats' in e.RTCRtpSender.prototype)
		)
			return;
		const t = e.RTCPeerConnection.prototype.getSenders;
		t &&
			(e.RTCPeerConnection.prototype.getSenders = function () {
				const i = t.apply(this, []);
				return i.forEach((o) => (o._pc = this)), i;
			});
		const r = e.RTCPeerConnection.prototype.addTrack;
		r &&
			(e.RTCPeerConnection.prototype.addTrack = function () {
				const i = r.apply(this, arguments);
				return (i._pc = this), i;
			}),
			(e.RTCRtpSender.prototype.getStats = function () {
				return this.track
					? this._pc.getStats(this.track)
					: Promise.resolve(new Map());
			});
	}
	function Ya(e) {
		if (
			!(typeof e == 'object' && e.RTCPeerConnection && e.RTCRtpSender) ||
			(e.RTCRtpSender && 'getStats' in e.RTCRtpReceiver.prototype)
		)
			return;
		const t = e.RTCPeerConnection.prototype.getReceivers;
		t &&
			(e.RTCPeerConnection.prototype.getReceivers = function () {
				const n = t.apply(this, []);
				return n.forEach((i) => (i._pc = this)), n;
			}),
			gr(e, 'track', (r) => ((r.receiver._pc = r.srcElement), r)),
			(e.RTCRtpReceiver.prototype.getStats = function () {
				return this._pc.getStats(this.track);
			});
	}
	function Xa(e) {
		!e.RTCPeerConnection ||
			'removeStream' in e.RTCPeerConnection.prototype ||
			(e.RTCPeerConnection.prototype.removeStream = function (r) {
				wn('removeStream', 'removeTrack'),
					this.getSenders().forEach((n) => {
						n.track && r.getTracks().includes(n.track) && this.removeTrack(n);
					});
			});
	}
	function Za(e) {
		e.DataChannel && !e.RTCDataChannel && (e.RTCDataChannel = e.DataChannel);
	}
	function Qa(e) {
		if (!(typeof e == 'object' && e.RTCPeerConnection)) return;
		const t = e.RTCPeerConnection.prototype.addTransceiver;
		t &&
			(e.RTCPeerConnection.prototype.addTransceiver = function () {
				this.setParametersPromises = [];
				const n = arguments[1],
					i = n && 'sendEncodings' in n;
				i &&
					n.sendEncodings.forEach((s) => {
						if ('rid' in s && !/^[a-z0-9]{0,16}$/i.test(s.rid))
							throw new TypeError('Invalid RID value provided.');
						if (
							'scaleResolutionDownBy' in s &&
							!(parseFloat(s.scaleResolutionDownBy) >= 1)
						)
							throw new RangeError('scale_resolution_down_by must be >= 1.0');
						if ('maxFramerate' in s && !(parseFloat(s.maxFramerate) >= 0))
							throw new RangeError('max_framerate must be >= 0.0');
					});
				const o = t.apply(this, arguments);
				if (i) {
					const { sender: s } = o,
						c = s.getParameters();
					(!('encodings' in c) ||
						(c.encodings.length === 1 &&
							Object.keys(c.encodings[0]).length === 0)) &&
						((c.encodings = n.sendEncodings),
						(s.sendEncodings = n.sendEncodings),
						this.setParametersPromises.push(
							s
								.setParameters(c)
								.then(() => {
									delete s.sendEncodings;
								})
								.catch(() => {
									delete s.sendEncodings;
								})
						));
				}
				return o;
			});
	}
	function ec(e) {
		if (!(typeof e == 'object' && e.RTCRtpSender)) return;
		const t = e.RTCRtpSender.prototype.getParameters;
		t &&
			(e.RTCRtpSender.prototype.getParameters = function () {
				const n = t.apply(this, arguments);
				return (
					'encodings' in n ||
						(n.encodings = [].concat(this.sendEncodings || [{}])),
					n
				);
			});
	}
	function tc(e) {
		if (!(typeof e == 'object' && e.RTCPeerConnection)) return;
		const t = e.RTCPeerConnection.prototype.createOffer;
		e.RTCPeerConnection.prototype.createOffer = function () {
			return this.setParametersPromises && this.setParametersPromises.length
				? Promise.all(this.setParametersPromises)
						.then(() => t.apply(this, arguments))
						.finally(() => {
							this.setParametersPromises = [];
						})
				: t.apply(this, arguments);
		};
	}
	function rc(e) {
		if (!(typeof e == 'object' && e.RTCPeerConnection)) return;
		const t = e.RTCPeerConnection.prototype.createAnswer;
		e.RTCPeerConnection.prototype.createAnswer = function () {
			return this.setParametersPromises && this.setParametersPromises.length
				? Promise.all(this.setParametersPromises)
						.then(() => t.apply(this, arguments))
						.finally(() => {
							this.setParametersPromises = [];
						})
				: t.apply(this, arguments);
		};
	}
	const Yo = Object.freeze(
		Object.defineProperty(
			{
				__proto__: null,
				shimOnTrack: Ka,
				shimPeerConnection: vi,
				shimSenderGetStats: qa,
				shimReceiverGetStats: Ya,
				shimRemoveStream: Xa,
				shimRTCDataChannel: Za,
				shimAddTransceiver: Qa,
				shimGetParameters: ec,
				shimCreateOffer: tc,
				shimCreateAnswer: rc,
				shimGetUserMedia: Ja,
				shimGetDisplayMedia: bd,
			},
			Symbol.toStringTag,
			{ value: 'Module' }
		)
	);
	function nc(e) {
		if (!(typeof e != 'object' || !e.RTCPeerConnection)) {
			if (
				('getLocalStreams' in e.RTCPeerConnection.prototype ||
					(e.RTCPeerConnection.prototype.getLocalStreams = function () {
						return (
							this._localStreams || (this._localStreams = []),
							this._localStreams
						);
					}),
				!('addStream' in e.RTCPeerConnection.prototype))
			) {
				const t = e.RTCPeerConnection.prototype.addTrack;
				(e.RTCPeerConnection.prototype.addStream = function (n) {
					this._localStreams || (this._localStreams = []),
						this._localStreams.includes(n) || this._localStreams.push(n),
						n.getAudioTracks().forEach((i) => t.call(this, i, n)),
						n.getVideoTracks().forEach((i) => t.call(this, i, n));
				}),
					(e.RTCPeerConnection.prototype.addTrack = function (n, ...i) {
						return (
							i &&
								i.forEach((o) => {
									this._localStreams
										? this._localStreams.includes(o) ||
										  this._localStreams.push(o)
										: (this._localStreams = [o]);
								}),
							t.apply(this, arguments)
						);
					});
			}
			'removeStream' in e.RTCPeerConnection.prototype ||
				(e.RTCPeerConnection.prototype.removeStream = function (r) {
					this._localStreams || (this._localStreams = []);
					const n = this._localStreams.indexOf(r);
					if (n === -1) return;
					this._localStreams.splice(n, 1);
					const i = r.getTracks();
					this.getSenders().forEach((o) => {
						i.includes(o.track) && this.removeTrack(o);
					});
				});
		}
	}
	function ic(e) {
		if (
			!(typeof e != 'object' || !e.RTCPeerConnection) &&
			('getRemoteStreams' in e.RTCPeerConnection.prototype ||
				(e.RTCPeerConnection.prototype.getRemoteStreams = function () {
					return this._remoteStreams ? this._remoteStreams : [];
				}),
			!('onaddstream' in e.RTCPeerConnection.prototype))
		) {
			Object.defineProperty(e.RTCPeerConnection.prototype, 'onaddstream', {
				get() {
					return this._onaddstream;
				},
				set(r) {
					this._onaddstream &&
						(this.removeEventListener('addstream', this._onaddstream),
						this.removeEventListener('track', this._onaddstreampoly)),
						this.addEventListener('addstream', (this._onaddstream = r)),
						this.addEventListener(
							'track',
							(this._onaddstreampoly = (n) => {
								n.streams.forEach((i) => {
									if (
										(this._remoteStreams || (this._remoteStreams = []),
										this._remoteStreams.includes(i))
									)
										return;
									this._remoteStreams.push(i);
									const o = new Event('addstream');
									(o.stream = i), this.dispatchEvent(o);
								});
							})
						);
				},
			});
			const t = e.RTCPeerConnection.prototype.setRemoteDescription;
			e.RTCPeerConnection.prototype.setRemoteDescription = function () {
				const n = this;
				return (
					this._onaddstreampoly ||
						this.addEventListener(
							'track',
							(this._onaddstreampoly = function (i) {
								i.streams.forEach((o) => {
									if (
										(n._remoteStreams || (n._remoteStreams = []),
										n._remoteStreams.indexOf(o) >= 0)
									)
										return;
									n._remoteStreams.push(o);
									const s = new Event('addstream');
									(s.stream = o), n.dispatchEvent(s);
								});
							})
						),
					t.apply(n, arguments)
				);
			};
		}
	}
	function oc(e) {
		if (typeof e != 'object' || !e.RTCPeerConnection) return;
		const t = e.RTCPeerConnection.prototype,
			r = t.createOffer,
			n = t.createAnswer,
			i = t.setLocalDescription,
			o = t.setRemoteDescription,
			s = t.addIceCandidate;
		(t.createOffer = function (l, u) {
			const f = arguments.length >= 2 ? arguments[2] : arguments[0],
				d = r.apply(this, [f]);
			return u ? (d.then(l, u), Promise.resolve()) : d;
		}),
			(t.createAnswer = function (l, u) {
				const f = arguments.length >= 2 ? arguments[2] : arguments[0],
					d = n.apply(this, [f]);
				return u ? (d.then(l, u), Promise.resolve()) : d;
			});
		let c = function (a, l, u) {
			const f = i.apply(this, [a]);
			return u ? (f.then(l, u), Promise.resolve()) : f;
		};
		(t.setLocalDescription = c),
			(c = function (a, l, u) {
				const f = o.apply(this, [a]);
				return u ? (f.then(l, u), Promise.resolve()) : f;
			}),
			(t.setRemoteDescription = c),
			(c = function (a, l, u) {
				const f = s.apply(this, [a]);
				return u ? (f.then(l, u), Promise.resolve()) : f;
			}),
			(t.addIceCandidate = c);
	}
	function sc(e) {
		const t = e && e.navigator;
		if (t.mediaDevices && t.mediaDevices.getUserMedia) {
			const r = t.mediaDevices,
				n = r.getUserMedia.bind(r);
			t.mediaDevices.getUserMedia = (i) => n(ac(i));
		}
		!t.getUserMedia &&
			t.mediaDevices &&
			t.mediaDevices.getUserMedia &&
			(t.getUserMedia = function (n, i, o) {
				t.mediaDevices.getUserMedia(n).then(i, o);
			}.bind(t));
	}
	function ac(e) {
		return e && e.video !== void 0
			? Object.assign({}, e, { video: wa(e.video) })
			: e;
	}
	function cc(e) {
		if (!e.RTCPeerConnection) return;
		const t = e.RTCPeerConnection;
		(e.RTCPeerConnection = function (n, i) {
			if (n && n.iceServers) {
				const o = [];
				for (let s = 0; s < n.iceServers.length; s++) {
					let c = n.iceServers[s];
					!c.hasOwnProperty('urls') && c.hasOwnProperty('url')
						? (wn('RTCIceServer.url', 'RTCIceServer.urls'),
						  (c = JSON.parse(JSON.stringify(c))),
						  (c.urls = c.url),
						  delete c.url,
						  o.push(c))
						: o.push(n.iceServers[s]);
				}
				n.iceServers = o;
			}
			return new t(n, i);
		}),
			(e.RTCPeerConnection.prototype = t.prototype),
			'generateCertificate' in t &&
				Object.defineProperty(e.RTCPeerConnection, 'generateCertificate', {
					get() {
						return t.generateCertificate;
					},
				});
	}
	function lc(e) {
		typeof e == 'object' &&
			e.RTCTrackEvent &&
			'receiver' in e.RTCTrackEvent.prototype &&
			!('transceiver' in e.RTCTrackEvent.prototype) &&
			Object.defineProperty(e.RTCTrackEvent.prototype, 'transceiver', {
				get() {
					return { receiver: this.receiver };
				},
			});
	}
	function uc(e) {
		const t = e.RTCPeerConnection.prototype.createOffer;
		e.RTCPeerConnection.prototype.createOffer = function (n) {
			if (n) {
				typeof n.offerToReceiveAudio < 'u' &&
					(n.offerToReceiveAudio = !!n.offerToReceiveAudio);
				const i = this.getTransceivers().find(
					(s) => s.receiver.track.kind === 'audio'
				);
				n.offerToReceiveAudio === !1 && i
					? i.direction === 'sendrecv'
						? i.setDirection
							? i.setDirection('sendonly')
							: (i.direction = 'sendonly')
						: i.direction === 'recvonly' &&
						  (i.setDirection
								? i.setDirection('inactive')
								: (i.direction = 'inactive'))
					: n.offerToReceiveAudio === !0 && !i && this.addTransceiver('audio'),
					typeof n.offerToReceiveVideo < 'u' &&
						(n.offerToReceiveVideo = !!n.offerToReceiveVideo);
				const o = this.getTransceivers().find(
					(s) => s.receiver.track.kind === 'video'
				);
				n.offerToReceiveVideo === !1 && o
					? o.direction === 'sendrecv'
						? o.setDirection
							? o.setDirection('sendonly')
							: (o.direction = 'sendonly')
						: o.direction === 'recvonly' &&
						  (o.setDirection
								? o.setDirection('inactive')
								: (o.direction = 'inactive'))
					: n.offerToReceiveVideo === !0 && !o && this.addTransceiver('video');
			}
			return t.apply(this, arguments);
		};
	}
	function fc(e) {
		typeof e != 'object' ||
			e.AudioContext ||
			(e.AudioContext = e.webkitAudioContext);
	}
	const Xo = Object.freeze(
		Object.defineProperty(
			{
				__proto__: null,
				shimLocalStreamsAPI: nc,
				shimRemoteStreamsAPI: ic,
				shimCallbacksAPI: oc,
				shimGetUserMedia: sc,
				shimConstraints: ac,
				shimRTCIceServerUrls: cc,
				shimTrackEventTransceiver: lc,
				shimCreateOfferLegacy: uc,
				shimAudioContext: fc,
			},
			Symbol.toStringTag,
			{ value: 'Module' }
		)
	);
	function rn(e) {
		if (
			!e.RTCIceCandidate ||
			(e.RTCIceCandidate && 'foundation' in e.RTCIceCandidate.prototype)
		)
			return;
		const t = e.RTCIceCandidate;
		(e.RTCIceCandidate = function (n) {
			if (
				(typeof n == 'object' &&
					n.candidate &&
					n.candidate.indexOf('a=') === 0 &&
					((n = JSON.parse(JSON.stringify(n))),
					(n.candidate = n.candidate.substr(2))),
				n.candidate && n.candidate.length)
			) {
				const i = new t(n),
					o = tn.parseCandidate(n.candidate),
					s = Object.assign(i, o);
				return (
					(s.toJSON = function () {
						return {
							candidate: s.candidate,
							sdpMid: s.sdpMid,
							sdpMLineIndex: s.sdpMLineIndex,
							usernameFragment: s.usernameFragment,
						};
					}),
					s
				);
			}
			return new t(n);
		}),
			(e.RTCIceCandidate.prototype = t.prototype),
			gr(
				e,
				'icecandidate',
				(r) => (
					r.candidate &&
						Object.defineProperty(r, 'candidate', {
							value: new e.RTCIceCandidate(r.candidate),
							writable: 'false',
						}),
					r
				)
			);
	}
	function Tr(e, t) {
		if (!e.RTCPeerConnection) return;
		'sctp' in e.RTCPeerConnection.prototype ||
			Object.defineProperty(e.RTCPeerConnection.prototype, 'sctp', {
				get() {
					return typeof this._sctp > 'u' ? null : this._sctp;
				},
			});
		const r = function (c) {
				if (!c || !c.sdp) return !1;
				const a = tn.splitSections(c.sdp);
				return (
					a.shift(),
					a.some((l) => {
						const u = tn.parseMLine(l);
						return (
							u && u.kind === 'application' && u.protocol.indexOf('SCTP') !== -1
						);
					})
				);
			},
			n = function (c) {
				const a = c.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);
				if (a === null || a.length < 2) return -1;
				const l = parseInt(a[1], 10);
				return l !== l ? -1 : l;
			},
			i = function (c) {
				let a = 65536;
				return (
					t.browser === 'firefox' &&
						(t.version < 57
							? c === -1
								? (a = 16384)
								: (a = 2147483637)
							: t.version < 60
							? (a = t.version === 57 ? 65535 : 65536)
							: (a = 2147483637)),
					a
				);
			},
			o = function (c, a) {
				let l = 65536;
				t.browser === 'firefox' && t.version === 57 && (l = 65535);
				const u = tn.matchPrefix(c.sdp, 'a=max-message-size:');
				return (
					u.length > 0
						? (l = parseInt(u[0].substr(19), 10))
						: t.browser === 'firefox' && a !== -1 && (l = 2147483637),
					l
				);
			},
			s = e.RTCPeerConnection.prototype.setRemoteDescription;
		e.RTCPeerConnection.prototype.setRemoteDescription = function () {
			if (((this._sctp = null), t.browser === 'chrome' && t.version >= 76)) {
				const { sdpSemantics: a } = this.getConfiguration();
				a === 'plan-b' &&
					Object.defineProperty(this, 'sctp', {
						get() {
							return typeof this._sctp > 'u' ? null : this._sctp;
						},
						enumerable: !0,
						configurable: !0,
					});
			}
			if (r(arguments[0])) {
				const a = n(arguments[0]),
					l = i(a),
					u = o(arguments[0], a);
				let f;
				l === 0 && u === 0
					? (f = Number.POSITIVE_INFINITY)
					: l === 0 || u === 0
					? (f = Math.max(l, u))
					: (f = Math.min(l, u));
				const d = {};
				Object.defineProperty(d, 'maxMessageSize', {
					get() {
						return f;
					},
				}),
					(this._sctp = d);
			}
			return s.apply(this, arguments);
		};
	}
	function xr(e) {
		if (
			!(
				e.RTCPeerConnection &&
				'createDataChannel' in e.RTCPeerConnection.prototype
			)
		)
			return;
		function t(n, i) {
			const o = n.send;
			n.send = function () {
				const c = arguments[0],
					a = c.length || c.size || c.byteLength;
				if (n.readyState === 'open' && i.sctp && a > i.sctp.maxMessageSize)
					throw new TypeError(
						'Message too large (can send a maximum of ' +
							i.sctp.maxMessageSize +
							' bytes)'
					);
				return o.apply(n, arguments);
			};
		}
		const r = e.RTCPeerConnection.prototype.createDataChannel;
		(e.RTCPeerConnection.prototype.createDataChannel = function () {
			const i = r.apply(this, arguments);
			return t(i, this), i;
		}),
			gr(e, 'datachannel', (n) => (t(n.channel, n.target), n));
	}
	function yi(e) {
		if (
			!e.RTCPeerConnection ||
			'connectionState' in e.RTCPeerConnection.prototype
		)
			return;
		const t = e.RTCPeerConnection.prototype;
		Object.defineProperty(t, 'connectionState', {
			get() {
				return (
					{ completed: 'connected', checking: 'connecting' }[
						this.iceConnectionState
					] || this.iceConnectionState
				);
			},
			enumerable: !0,
			configurable: !0,
		}),
			Object.defineProperty(t, 'onconnectionstatechange', {
				get() {
					return this._onconnectionstatechange || null;
				},
				set(r) {
					this._onconnectionstatechange &&
						(this.removeEventListener(
							'connectionstatechange',
							this._onconnectionstatechange
						),
						delete this._onconnectionstatechange),
						r &&
							this.addEventListener(
								'connectionstatechange',
								(this._onconnectionstatechange = r)
							);
				},
				enumerable: !0,
				configurable: !0,
			}),
			['setLocalDescription', 'setRemoteDescription'].forEach((r) => {
				const n = t[r];
				t[r] = function () {
					return (
						this._connectionstatechangepoly ||
							((this._connectionstatechangepoly = (i) => {
								const o = i.target;
								if (o._lastConnectionState !== o.connectionState) {
									o._lastConnectionState = o.connectionState;
									const s = new Event('connectionstatechange', i);
									o.dispatchEvent(s);
								}
								return i;
							}),
							this.addEventListener(
								'iceconnectionstatechange',
								this._connectionstatechangepoly
							)),
						n.apply(this, arguments)
					);
				};
			});
	}
	function _i(e, t) {
		if (
			!e.RTCPeerConnection ||
			(t.browser === 'chrome' && t.version >= 71) ||
			(t.browser === 'safari' && t.version >= 605)
		)
			return;
		const r = e.RTCPeerConnection.prototype.setRemoteDescription;
		e.RTCPeerConnection.prototype.setRemoteDescription = function (i) {
			if (
				i &&
				i.sdp &&
				i.sdp.indexOf(`
a=extmap-allow-mixed`) !== -1
			) {
				const o = i.sdp
					.split(
						`
`
					)
					.filter((s) => s.trim() !== 'a=extmap-allow-mixed').join(`
`);
				e.RTCSessionDescription && i instanceof e.RTCSessionDescription
					? (arguments[0] = new e.RTCSessionDescription({
							type: i.type,
							sdp: o,
					  }))
					: (i.sdp = o);
			}
			return r.apply(this, arguments);
		};
	}
	function nn(e, t) {
		if (!(e.RTCPeerConnection && e.RTCPeerConnection.prototype)) return;
		const r = e.RTCPeerConnection.prototype.addIceCandidate;
		!r ||
			r.length === 0 ||
			(e.RTCPeerConnection.prototype.addIceCandidate = function () {
				return arguments[0]
					? ((t.browser === 'chrome' && t.version < 78) ||
							(t.browser === 'firefox' && t.version < 68) ||
							t.browser === 'safari') &&
					  arguments[0] &&
					  arguments[0].candidate === ''
						? Promise.resolve()
						: r.apply(this, arguments)
					: (arguments[1] && arguments[1].apply(null), Promise.resolve());
			});
	}
	const Cd = Object.freeze(
		Object.defineProperty(
			{
				__proto__: null,
				shimRTCIceCandidate: rn,
				shimMaxMessageSize: Tr,
				shimSendThrowTypeError: xr,
				shimConnectionState: yi,
				removeExtmapAllowMixed: _i,
				shimAddIceCandidateNullOrEmpty: nn,
			},
			Symbol.toStringTag,
			{ value: 'Module' }
		)
	);
	function Sd(
		{ window: e } = {},
		t = { shimChrome: !0, shimFirefox: !0, shimEdge: !0, shimSafari: !0 }
	) {
		const r = Hi,
			n = hd(e),
			i = {
				browserDetails: n,
				commonShim: Cd,
				extractVersion: Sr,
				disableLog: dd,
				disableWarnings: pd,
			};
		switch (n.browser) {
			case 'chrome':
				if (!Vo || !mi || !t.shimChrome)
					return r('Chrome shim is not included in this adapter release.'), i;
				if (n.version === null)
					return r('Chrome shim can not determine version, not shimming.'), i;
				r('adapter.js shimming chrome.'),
					(i.browserShim = Vo),
					nn(e, n),
					ja(e, n),
					Fa(e),
					mi(e, n),
					Ba(e),
					Ga(e, n),
					La(e),
					$a(e),
					Na(e),
					za(e, n),
					rn(e),
					yi(e),
					Tr(e, n),
					xr(e),
					_i(e, n);
				break;
			case 'firefox':
				if (!Yo || !vi || !t.shimFirefox)
					return r('Firefox shim is not included in this adapter release.'), i;
				r('adapter.js shimming firefox.'),
					(i.browserShim = Yo),
					nn(e, n),
					Ja(e, n),
					vi(e, n),
					Ka(e),
					Xa(e),
					qa(e),
					Ya(e),
					Za(e),
					Qa(e),
					ec(e),
					tc(e),
					rc(e),
					rn(e),
					yi(e),
					Tr(e, n),
					xr(e);
				break;
			case 'edge':
				if (!qo || !gi || !t.shimEdge)
					return r('MS edge shim is not included in this adapter release.'), i;
				r('adapter.js shimming edge.'),
					(i.browserShim = qo),
					Wa(e),
					Ha(e),
					gi(e, n),
					Va(e),
					Tr(e, n),
					xr(e);
				break;
			case 'safari':
				if (!Xo || !t.shimSafari)
					return r('Safari shim is not included in this adapter release.'), i;
				r('adapter.js shimming safari.'),
					(i.browserShim = Xo),
					nn(e, n),
					cc(e),
					uc(e),
					oc(e),
					nc(e),
					ic(e),
					lc(e),
					sc(e),
					fc(e),
					rn(e),
					Tr(e, n),
					xr(e),
					_i(e, n);
				break;
			default:
				r('Unsupported browser!');
				break;
		}
		return i;
	}
	const Zo = Sd({ window: typeof window > 'u' ? void 0 : window });
	function dt(e, t, r, n) {
		Object.defineProperty(e, t, {
			get: r,
			set: n,
			enumerable: !0,
			configurable: !0,
		});
	}
	var Wn = Zo.default || Zo,
		yr = new ((function () {
			function e() {
				(this.isIOS = ['iPad', 'iPhone', 'iPod'].includes(navigator.platform)),
					(this.supportedBrowsers = ['firefox', 'chrome', 'safari']),
					(this.minFirefoxVersion = 59),
					(this.minChromeVersion = 72),
					(this.minSafariVersion = 605);
			}
			return (
				(e.prototype.isWebRTCSupported = function () {
					return typeof RTCPeerConnection < 'u';
				}),
				(e.prototype.isBrowserSupported = function () {
					var t = this.getBrowser(),
						r = this.getVersion(),
						n = this.supportedBrowsers.includes(t);
					return n
						? t === 'chrome'
							? r >= this.minChromeVersion
							: t === 'firefox'
							? r >= this.minFirefoxVersion
							: t === 'safari'
							? !this.isIOS && r >= this.minSafariVersion
							: !1
						: !1;
				}),
				(e.prototype.getBrowser = function () {
					return Wn.browserDetails.browser;
				}),
				(e.prototype.getVersion = function () {
					return Wn.browserDetails.version || 0;
				}),
				(e.prototype.isUnifiedPlanSupported = function () {
					var t = this.getBrowser(),
						r = Wn.browserDetails.version || 0;
					if (t === 'chrome' && r < this.minChromeVersion) return !1;
					if (t === 'firefox' && r >= this.minFirefoxVersion) return !0;
					if (
						!window.RTCRtpTransceiver ||
						!('currentDirection' in RTCRtpTransceiver.prototype)
					)
						return !1;
					var n,
						i = !1;
					try {
						(n = new RTCPeerConnection()), n.addTransceiver('audio'), (i = !0);
					} catch {
					} finally {
						n && n.close();
					}
					return i;
				}),
				(e.prototype.toString = function () {
					return `Supports:
    browser:`
						.concat(
							this.getBrowser(),
							`
    version:`
						)
						.concat(
							this.getVersion(),
							`
    isIOS:`
						)
						.concat(
							this.isIOS,
							`
    isWebRTCSupported:`
						)
						.concat(
							this.isWebRTCSupported(),
							`
    isBrowserSupported:`
						)
						.concat(
							this.isBrowserSupported(),
							`
    isUnifiedPlanSupported:`
						)
						.concat(this.isUnifiedPlanSupported());
				}),
				e
			);
		})())(),
		Qo = {
			iceServers: [
				{ urls: 'stun:stun.l.google.com:19302' },
				{
					urls: [
						'turn:eu-0.turn.peerjs.com:3478',
						'turn:us-0.turn.peerjs.com:3478',
					],
					username: 'peerjs',
					credential: 'peerjsp',
				},
			],
			sdpSemantics: 'unified-plan',
		},
		Td = (function () {
			function e() {
				(this.CLOUD_HOST = '0.peerjs.com'),
					(this.CLOUD_PORT = 443),
					(this.chunkedBrowsers = { Chrome: 1, chrome: 1 }),
					(this.chunkedMTU = 16300),
					(this.defaultConfig = Qo),
					(this.browser = yr.getBrowser()),
					(this.browserVersion = yr.getVersion()),
					(this.supports = (function () {
						var t = {
							browser: yr.isBrowserSupported(),
							webRTC: yr.isWebRTCSupported(),
							audioVideo: !1,
							data: !1,
							binaryBlob: !1,
							reliable: !1,
						};
						if (!t.webRTC) return t;
						var r;
						try {
							(r = new RTCPeerConnection(Qo)), (t.audioVideo = !0);
							var n = void 0;
							try {
								(n = r.createDataChannel('_PEERJSTEST', { ordered: !0 })),
									(t.data = !0),
									(t.reliable = !!n.ordered);
								try {
									(n.binaryType = 'blob'), (t.binaryBlob = !yr.isIOS);
								} catch {}
							} catch {
							} finally {
								n && n.close();
							}
						} catch {
						} finally {
							r && r.close();
						}
						return t;
					})()),
					(this.pack = Go.pack),
					(this.unpack = Go.unpack),
					(this._dataCount = 1);
			}
			return (
				(e.prototype.noop = function () {}),
				(e.prototype.validateId = function (t) {
					return !t || /^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(t);
				}),
				(e.prototype.chunk = function (t) {
					for (
						var r = [],
							n = t.size,
							i = Math.ceil(n / ae.chunkedMTU),
							o = 0,
							s = 0;
						s < n;

					) {
						var c = Math.min(n, s + ae.chunkedMTU),
							a = t.slice(s, c),
							l = { __peerData: this._dataCount, n: o, data: a, total: i };
						r.push(l), (s = c), o++;
					}
					return this._dataCount++, r;
				}),
				(e.prototype.blobToArrayBuffer = function (t, r) {
					var n = new FileReader();
					return (
						(n.onload = function (i) {
							i.target && r(i.target.result);
						}),
						n.readAsArrayBuffer(t),
						n
					);
				}),
				(e.prototype.binaryStringToArrayBuffer = function (t) {
					for (var r = new Uint8Array(t.length), n = 0; n < t.length; n++)
						r[n] = t.charCodeAt(n) & 255;
					return r.buffer;
				}),
				(e.prototype.randomToken = function () {
					return Math.random().toString(36).slice(2);
				}),
				(e.prototype.isSecure = function () {
					return location.protocol === 'https:';
				}),
				e
			);
		})(),
		ae = new Td(),
		dc = {};
	dt(
		dc,
		'Peer',
		() => us,
		(e) => (us = e)
	);
	var Nr = {},
		xd = Object.prototype.hasOwnProperty,
		Le = '~';
	function $r() {}
	Object.create &&
		(($r.prototype = Object.create(null)), new $r().__proto__ || (Le = !1));
	function Pd(e, t, r) {
		(this.fn = e), (this.context = t), (this.once = r || !1);
	}
	function pc(e, t, r, n, i) {
		if (typeof r != 'function')
			throw new TypeError('The listener must be a function');
		var o = new Pd(r, n || e, i),
			s = Le ? Le + t : t;
		return (
			e._events[s]
				? e._events[s].fn
					? (e._events[s] = [e._events[s], o])
					: e._events[s].push(o)
				: ((e._events[s] = o), e._eventsCount++),
			e
		);
	}
	function on(e, t) {
		--e._eventsCount === 0 ? (e._events = new $r()) : delete e._events[t];
	}
	function Fe() {
		(this._events = new $r()), (this._eventsCount = 0);
	}
	Fe.prototype.eventNames = function () {
		var t = [],
			r,
			n;
		if (this._eventsCount === 0) return t;
		for (n in (r = this._events)) xd.call(r, n) && t.push(Le ? n.slice(1) : n);
		return Object.getOwnPropertySymbols
			? t.concat(Object.getOwnPropertySymbols(r))
			: t;
	};
	Fe.prototype.listeners = function (t) {
		var r = Le ? Le + t : t,
			n = this._events[r];
		if (!n) return [];
		if (n.fn) return [n.fn];
		for (var i = 0, o = n.length, s = new Array(o); i < o; i++) s[i] = n[i].fn;
		return s;
	};
	Fe.prototype.listenerCount = function (t) {
		var r = Le ? Le + t : t,
			n = this._events[r];
		return n ? (n.fn ? 1 : n.length) : 0;
	};
	Fe.prototype.emit = function (t, r, n, i, o, s) {
		var c = Le ? Le + t : t;
		if (!this._events[c]) return !1;
		var a = this._events[c],
			l = arguments.length,
			u,
			f;
		if (a.fn) {
			switch ((a.once && this.removeListener(t, a.fn, void 0, !0), l)) {
				case 1:
					return a.fn.call(a.context), !0;
				case 2:
					return a.fn.call(a.context, r), !0;
				case 3:
					return a.fn.call(a.context, r, n), !0;
				case 4:
					return a.fn.call(a.context, r, n, i), !0;
				case 5:
					return a.fn.call(a.context, r, n, i, o), !0;
				case 6:
					return a.fn.call(a.context, r, n, i, o, s), !0;
			}
			for (f = 1, u = new Array(l - 1); f < l; f++) u[f - 1] = arguments[f];
			a.fn.apply(a.context, u);
		} else {
			var d = a.length,
				h;
			for (f = 0; f < d; f++)
				switch ((a[f].once && this.removeListener(t, a[f].fn, void 0, !0), l)) {
					case 1:
						a[f].fn.call(a[f].context);
						break;
					case 2:
						a[f].fn.call(a[f].context, r);
						break;
					case 3:
						a[f].fn.call(a[f].context, r, n);
						break;
					case 4:
						a[f].fn.call(a[f].context, r, n, i);
						break;
					default:
						if (!u)
							for (h = 1, u = new Array(l - 1); h < l; h++)
								u[h - 1] = arguments[h];
						a[f].fn.apply(a[f].context, u);
				}
		}
		return !0;
	};
	Fe.prototype.on = function (t, r, n) {
		return pc(this, t, r, n, !1);
	};
	Fe.prototype.once = function (t, r, n) {
		return pc(this, t, r, n, !0);
	};
	Fe.prototype.removeListener = function (t, r, n, i) {
		var o = Le ? Le + t : t;
		if (!this._events[o]) return this;
		if (!r) return on(this, o), this;
		var s = this._events[o];
		if (s.fn)
			s.fn === r && (!i || s.once) && (!n || s.context === n) && on(this, o);
		else {
			for (var c = 0, a = [], l = s.length; c < l; c++)
				(s[c].fn !== r || (i && !s[c].once) || (n && s[c].context !== n)) &&
					a.push(s[c]);
			a.length ? (this._events[o] = a.length === 1 ? a[0] : a) : on(this, o);
		}
		return this;
	};
	Fe.prototype.removeAllListeners = function (t) {
		var r;
		return (
			t
				? ((r = Le ? Le + t : t), this._events[r] && on(this, r))
				: ((this._events = new $r()), (this._eventsCount = 0)),
			this
		);
	};
	Fe.prototype.off = Fe.prototype.removeListener;
	Fe.prototype.addListener = Fe.prototype.on;
	Fe.prefixed = Le;
	Fe.EventEmitter = Fe;
	Nr = Fe;
	var L = {};
	dt(
		L,
		'LogLevel',
		() => Ne,
		(e) => (Ne = e)
	);
	dt(
		L,
		'default',
		() => es,
		(e) => (es = e)
	);
	var Ft = function (e, t) {
			var r = typeof Symbol == 'function' && e[Symbol.iterator];
			if (!r) return e;
			var n = r.call(e),
				i,
				o = [],
				s;
			try {
				for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; )
					o.push(i.value);
			} catch (c) {
				s = { error: c };
			} finally {
				try {
					i && !i.done && (r = n.return) && r.call(n);
				} finally {
					if (s) throw s.error;
				}
			}
			return o;
		},
		Bt = function (e, t, r) {
			if (r || arguments.length === 2)
				for (var n = 0, i = t.length, o; n < i; n++)
					(o || !(n in t)) &&
						(o || (o = Array.prototype.slice.call(t, 0, n)), (o[n] = t[n]));
			return e.concat(o || Array.prototype.slice.call(t));
		},
		kd = 'PeerJS: ',
		Ne;
	(function (e) {
		(e[(e.Disabled = 0)] = 'Disabled'),
			(e[(e.Errors = 1)] = 'Errors'),
			(e[(e.Warnings = 2)] = 'Warnings'),
			(e[(e.All = 3)] = 'All');
	})(Ne || (Ne = {}));
	var Ed = (function () {
			function e() {
				this._logLevel = Ne.Disabled;
			}
			return (
				Object.defineProperty(e.prototype, 'logLevel', {
					get: function () {
						return this._logLevel;
					},
					set: function (t) {
						this._logLevel = t;
					},
					enumerable: !1,
					configurable: !0,
				}),
				(e.prototype.log = function () {
					for (var t = [], r = 0; r < arguments.length; r++)
						t[r] = arguments[r];
					this._logLevel >= Ne.All &&
						this._print.apply(this, Bt([Ne.All], Ft(t), !1));
				}),
				(e.prototype.warn = function () {
					for (var t = [], r = 0; r < arguments.length; r++)
						t[r] = arguments[r];
					this._logLevel >= Ne.Warnings &&
						this._print.apply(this, Bt([Ne.Warnings], Ft(t), !1));
				}),
				(e.prototype.error = function () {
					for (var t = [], r = 0; r < arguments.length; r++)
						t[r] = arguments[r];
					this._logLevel >= Ne.Errors &&
						this._print.apply(this, Bt([Ne.Errors], Ft(t), !1));
				}),
				(e.prototype.setLogFunction = function (t) {
					this._print = t;
				}),
				(e.prototype._print = function (t) {
					for (var r = [], n = 1; n < arguments.length; n++)
						r[n - 1] = arguments[n];
					var i = Bt([kd], Ft(r), !1);
					for (var o in i)
						i[o] instanceof Error &&
							(i[o] = '(' + i[o].name + ') ' + i[o].message);
					t >= Ne.All
						? console.log.apply(console, Bt([], Ft(i), !1))
						: t >= Ne.Warnings
						? console.warn.apply(console, Bt(['WARNING'], Ft(i), !1))
						: t >= Ne.Errors &&
						  console.error.apply(console, Bt(['ERROR'], Ft(i), !1));
				}),
				e
			);
		})(),
		es = new Ed(),
		hc = {};
	dt(
		hc,
		'Socket',
		() => ts,
		(e) => (ts = e)
	);
	var tt;
	(function (e) {
		(e.Data = 'data'), (e.Media = 'media');
	})(tt || (tt = {}));
	var Ce;
	(function (e) {
		(e.BrowserIncompatible = 'browser-incompatible'),
			(e.Disconnected = 'disconnected'),
			(e.InvalidID = 'invalid-id'),
			(e.InvalidKey = 'invalid-key'),
			(e.Network = 'network'),
			(e.PeerUnavailable = 'peer-unavailable'),
			(e.SslUnavailable = 'ssl-unavailable'),
			(e.ServerError = 'server-error'),
			(e.SocketError = 'socket-error'),
			(e.SocketClosed = 'socket-closed'),
			(e.UnavailableID = 'unavailable-id'),
			(e.WebRTC = 'webrtc');
	})(Ce || (Ce = {}));
	var ht;
	(function (e) {
		(e.Binary = 'binary'), (e.BinaryUTF8 = 'binary-utf8'), (e.JSON = 'json');
	})(ht || (ht = {}));
	var vt;
	(function (e) {
		(e.Message = 'message'),
			(e.Disconnected = 'disconnected'),
			(e.Error = 'error'),
			(e.Close = 'close');
	})(vt || (vt = {}));
	var Oe;
	(function (e) {
		(e.Heartbeat = 'HEARTBEAT'),
			(e.Candidate = 'CANDIDATE'),
			(e.Offer = 'OFFER'),
			(e.Answer = 'ANSWER'),
			(e.Open = 'OPEN'),
			(e.Error = 'ERROR'),
			(e.IdTaken = 'ID-TAKEN'),
			(e.InvalidKey = 'INVALID-KEY'),
			(e.Leave = 'LEAVE'),
			(e.Expire = 'EXPIRE');
	})(Oe || (Oe = {}));
	var Ji = {};
	Ji = JSON.parse(
		'{"name":"peerjs","version":"1.4.6","keywords":["peerjs","webrtc","p2p","rtc"],"description":"PeerJS client","homepage":"https://peerjs.com","bugs":{"url":"https://github.com/peers/peerjs/issues"},"repository":{"type":"git","url":"https://github.com/peers/peerjs"},"license":"MIT","contributors":["Michelle Bu <michelle@michellebu.com>","afrokick <devbyru@gmail.com>","ericz <really.ez@gmail.com>","Jairo <kidandcat@gmail.com>","Jonas Gloning <34194370+jonasgloning@users.noreply.github.com>","Jairo Caro-Accino Viciana <jairo@galax.be>","Carlos Caballero <carlos.caballero.gonzalez@gmail.com>","hc <hheennrryy@gmail.com>","Muhammad Asif <capripio@gmail.com>","PrashoonB <prashoonbhattacharjee@gmail.com>","Harsh Bardhan Mishra <47351025+HarshCasper@users.noreply.github.com>","akotynski <aleksanderkotbury@gmail.com>","lmb <i@lmb.io>","Jairooo <jairocaro@msn.com>","Moritz St\xFCckler <moritz.stueckler@gmail.com>","Simon <crydotsnakegithub@gmail.com>","Denis Lukov <denismassters@gmail.com>","Philipp Hancke <fippo@andyet.net>","Hans Oksendahl <hansoksendahl@gmail.com>","Jess <jessachandler@gmail.com>","khankuan <khankuan@gmail.com>","DUODVK <kurmanov.work@gmail.com>","XiZhao <kwang1imsa@gmail.com>","Matthias Lohr <matthias@lohr.me>","=frank tree <=frnktrb@googlemail.com>","Andre Eckardt <aeckardt@outlook.com>","Chris Cowan <agentme49@gmail.com>","Alex Chuev <alex@chuev.com>","alxnull <alxnull@e.mail.de>","Yemel Jardi <angel.jardi@gmail.com>","Ben Parnell <benjaminparnell.94@gmail.com>","Benny Lichtner <bennlich@gmail.com>","fresheneesz <bitetrudpublic@gmail.com>","bob.barstead@exaptive.com <bob.barstead@exaptive.com>","chandika <chandika@gmail.com>","emersion <contact@emersion.fr>","Christopher Van <cvan@users.noreply.github.com>","eddieherm <edhermoso@gmail.com>","Eduardo Pinho <enet4mikeenet@gmail.com>","Evandro Zanatta <ezanatta@tray.net.br>","Gardner Bickford <gardner@users.noreply.github.com>","Gian Luca <gianluca.cecchi@cynny.com>","PatrickJS <github@gdi2290.com>","jonnyf <github@jonathanfoss.co.uk>","Hizkia Felix <hizkifw@gmail.com>","Hristo Oskov <hristo.oskov@gmail.com>","Isaac Madwed <i.madwed@gmail.com>","Ilya Konanykhin <ilya.konanykhin@gmail.com>","jasonbarry <jasbarry@me.com>","Jonathan Burke <jonathan.burke.1311@googlemail.com>","Josh Hamit <josh.hamit@gmail.com>","Jordan Austin <jrax86@gmail.com>","Joel Wetzell <jwetzell@yahoo.com>","xizhao <kevin.wang@cloudera.com>","Alberto Torres <kungfoobar@gmail.com>","Jonathan Mayol <mayoljonathan@gmail.com>","Jefferson Felix <me@jsfelix.dev>","Rolf Erik Lekang <me@rolflekang.com>","Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>","Pepijn de Vos <pepijndevos@gmail.com>","JooYoung <qkdlql@naver.com>","Tobias Speicher <rootcommander@gmail.com>","Steve Blaurock <sblaurock@gmail.com>","Kyrylo Shegeda <shegeda@ualberta.ca>","Diwank Singh Tomer <singh@diwank.name>","So\u0308ren Balko <Soeren.Balko@gmail.com>","Arpit Solanki <solankiarpit1997@gmail.com>","Yuki Ito <yuki@gnnk.net>","Artur Zayats <zag2art@gmail.com>"],"funding":{"type":"opencollective","url":"https://opencollective.com/peer"},"collective":{"type":"opencollective","url":"https://opencollective.com/peer"},"files":["dist/*"],"type":"module","sideEffects":["lib/global.ts","lib/supports.ts"],"main":"dist/bundler.cjs","module":"dist/bundler.mjs","browser-minified":"dist/peerjs.min.cjs","browser-unminified":"dist/peerjs.cjs","types":"dist/types.d.ts","engines":{"node":">= 10"},"targets":{"types":{"source":"lib/exports.ts"},"main":{"source":"lib/exports.ts","sourceMap":{"inlineSources":true}},"module":{"source":"lib/exports.ts","includeNodeModules":["eventemitter3"],"sourceMap":{"inlineSources":true}},"browser-minified":{"includeNodeModules":true,"context":"browser","optimize":true,"engines":{"browsers":"cover 99%, not dead"},"source":"lib/global.ts"},"browser-unminified":{"includeNodeModules":true,"context":"browser","optimize":false,"engines":{"browsers":"cover 99%, not dead"},"source":"lib/global.ts"}},"scripts":{"contributors":"git-authors-cli --print=false && prettier --write package.json && git add package.json package-lock.json && git commit -m \\"chore(contributors): update and sort contributors list\\"","check":"tsc --noEmit","watch":"parcel watch","build":"rm -rf dist && parcel build && cp dist/peerjs.cjs dist/peerjs.js && cp dist/peerjs.min.cjs dist/peerjs.min.js","prepublishOnly":"npm run build","test":"mocha -r ts-node/register -r jsdom-global/register test/**/*.ts","format":"prettier --write .","semantic-release":"semantic-release"},"devDependencies":{"@parcel/config-default":"^2.5.0","@parcel/packager-ts":"^2.5.0","@parcel/transformer-typescript-tsc":"^2.5.0","@parcel/transformer-typescript-types":"^2.5.0","@semantic-release/changelog":"^6.0.1","@semantic-release/git":"^10.0.1","@types/chai":"^4.3.0","@types/mocha":"^9.1.0","@types/node":"^17.0.18","chai":"^4.3.6","git-authors-cli":"^1.0.40","jsdom":"^19.0.0","jsdom-global":"^3.0.2","mocha":"^9.2.0","mock-socket":"8.0.5","parcel":"^2.5.0","parcel-transformer-tsc-sourcemaps":"^1.0.2","prettier":"^2.6.2","semantic-release":"^19.0.2","standard":"^16.0.4","ts-node":"^10.5.0","typescript":"^4.5.5"},"dependencies":{"@swc/helpers":"^0.3.13","eventemitter3":"^4.0.7","peerjs-js-binarypack":"1.0.1","webrtc-adapter":"^7.7.1"}}'
	);
	var Rd = (function () {
			var e = function (t, r) {
				return (
					(e =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (n, i) {
								n.__proto__ = i;
							}) ||
						function (n, i) {
							for (var o in i)
								Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
						}),
					e(t, r)
				);
			};
			return function (t, r) {
				if (typeof r != 'function' && r !== null)
					throw new TypeError(
						'Class extends value ' + String(r) + ' is not a constructor or null'
					);
				e(t, r);
				function n() {
					this.constructor = t;
				}
				t.prototype =
					r === null
						? Object.create(r)
						: ((n.prototype = r.prototype), new n());
			};
		})(),
		Od = function (e, t) {
			var r = typeof Symbol == 'function' && e[Symbol.iterator];
			if (!r) return e;
			var n = r.call(e),
				i,
				o = [],
				s;
			try {
				for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; )
					o.push(i.value);
			} catch (c) {
				s = { error: c };
			} finally {
				try {
					i && !i.done && (r = n.return) && r.call(n);
				} finally {
					if (s) throw s.error;
				}
			}
			return o;
		},
		Md = function (e, t, r) {
			if (r || arguments.length === 2)
				for (var n = 0, i = t.length, o; n < i; n++)
					(o || !(n in t)) &&
						(o || (o = Array.prototype.slice.call(t, 0, n)), (o[n] = t[n]));
			return e.concat(o || Array.prototype.slice.call(t));
		},
		Dd = function (e) {
			var t = typeof Symbol == 'function' && Symbol.iterator,
				r = t && e[t],
				n = 0;
			if (r) return r.call(e);
			if (e && typeof e.length == 'number')
				return {
					next: function () {
						return (
							e && n >= e.length && (e = void 0),
							{ value: e && e[n++], done: !e }
						);
					},
				};
			throw new TypeError(
				t ? 'Object is not iterable.' : 'Symbol.iterator is not defined.'
			);
		},
		ts = (function (e) {
			Rd(t, e);
			function t(r, n, i, o, s, c) {
				c === void 0 && (c = 5e3);
				var a = e.call(this) || this;
				(a.pingInterval = c), (a._disconnected = !0), (a._messagesQueue = []);
				var l = r ? 'wss://' : 'ws://';
				return (a._baseUrl = l + n + ':' + i + o + 'peerjs?key=' + s), a;
			}
			return (
				(t.prototype.start = function (r, n) {
					var i = this;
					this._id = r;
					var o = ''
						.concat(this._baseUrl, '&id=')
						.concat(r, '&token=')
						.concat(n);
					!!this._socket ||
						!this._disconnected ||
						((this._socket = new WebSocket(o + '&version=' + Ji.version)),
						(this._disconnected = !1),
						(this._socket.onmessage = function (s) {
							var c;
							try {
								(c = JSON.parse(s.data)),
									L.default.log('Server message received:', c);
							} catch {
								L.default.log('Invalid server message', s.data);
								return;
							}
							i.emit(vt.Message, c);
						}),
						(this._socket.onclose = function (s) {
							i._disconnected ||
								(L.default.log('Socket closed.', s),
								i._cleanup(),
								(i._disconnected = !0),
								i.emit(vt.Disconnected));
						}),
						(this._socket.onopen = function () {
							i._disconnected ||
								(i._sendQueuedMessages(),
								L.default.log('Socket open'),
								i._scheduleHeartbeat());
						}));
				}),
				(t.prototype._scheduleHeartbeat = function () {
					var r = this;
					this._wsPingTimer = setTimeout(function () {
						r._sendHeartbeat();
					}, this.pingInterval);
				}),
				(t.prototype._sendHeartbeat = function () {
					if (!this._wsOpen()) {
						L.default.log('Cannot send heartbeat, because socket closed');
						return;
					}
					var r = JSON.stringify({ type: Oe.Heartbeat });
					this._socket.send(r), this._scheduleHeartbeat();
				}),
				(t.prototype._wsOpen = function () {
					return !!this._socket && this._socket.readyState === 1;
				}),
				(t.prototype._sendQueuedMessages = function () {
					var r,
						n,
						i = Md([], Od(this._messagesQueue), !1);
					this._messagesQueue = [];
					try {
						for (var o = Dd(i), s = o.next(); !s.done; s = o.next()) {
							var c = s.value;
							this.send(c);
						}
					} catch (a) {
						r = { error: a };
					} finally {
						try {
							s && !s.done && (n = o.return) && n.call(o);
						} finally {
							if (r) throw r.error;
						}
					}
				}),
				(t.prototype.send = function (r) {
					if (!this._disconnected) {
						if (!this._id) {
							this._messagesQueue.push(r);
							return;
						}
						if (!r.type) {
							this.emit(vt.Error, 'Invalid message');
							return;
						}
						if (!!this._wsOpen()) {
							var n = JSON.stringify(r);
							this._socket.send(n);
						}
					}
				}),
				(t.prototype.close = function () {
					this._disconnected || (this._cleanup(), (this._disconnected = !0));
				}),
				(t.prototype._cleanup = function () {
					this._socket &&
						((this._socket.onopen =
							this._socket.onmessage =
							this._socket.onclose =
								null),
						this._socket.close(),
						(this._socket = void 0)),
						clearTimeout(this._wsPingTimer);
				}),
				t
			);
		})(Nr.EventEmitter),
		bi = {};
	dt(
		bi,
		'MediaConnection',
		() => is,
		(e) => (is = e)
	);
	var Ki = {};
	dt(
		Ki,
		'Negotiator',
		() => rs,
		(e) => (rs = e)
	);
	var pn = function () {
			return (
				(pn =
					Object.assign ||
					function (e) {
						for (var t, r = 1, n = arguments.length; r < n; r++) {
							t = arguments[r];
							for (var i in t)
								Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						}
						return e;
					}),
				pn.apply(this, arguments)
			);
		},
		Yr = function (e, t, r, n) {
			function i(o) {
				return o instanceof r
					? o
					: new r(function (s) {
							s(o);
					  });
			}
			return new (r || (r = Promise))(function (o, s) {
				function c(u) {
					try {
						l(n.next(u));
					} catch (f) {
						s(f);
					}
				}
				function a(u) {
					try {
						l(n.throw(u));
					} catch (f) {
						s(f);
					}
				}
				function l(u) {
					u.done ? o(u.value) : i(u.value).then(c, a);
				}
				l((n = n.apply(e, t || [])).next());
			});
		},
		Xr = function (e, t) {
			var r = {
					label: 0,
					sent: function () {
						if (o[0] & 1) throw o[1];
						return o[1];
					},
					trys: [],
					ops: [],
				},
				n,
				i,
				o,
				s;
			return (
				(s = { next: c(0), throw: c(1), return: c(2) }),
				typeof Symbol == 'function' &&
					(s[Symbol.iterator] = function () {
						return this;
					}),
				s
			);
			function c(l) {
				return function (u) {
					return a([l, u]);
				};
			}
			function a(l) {
				if (n) throw new TypeError('Generator is already executing.');
				for (; r; )
					try {
						if (
							((n = 1),
							i &&
								(o =
									l[0] & 2
										? i.return
										: l[0]
										? i.throw || ((o = i.return) && o.call(i), 0)
										: i.next) &&
								!(o = o.call(i, l[1])).done)
						)
							return o;
						switch (((i = 0), o && (l = [l[0] & 2, o.value]), l[0])) {
							case 0:
							case 1:
								o = l;
								break;
							case 4:
								return r.label++, { value: l[1], done: !1 };
							case 5:
								r.label++, (i = l[1]), (l = [0]);
								continue;
							case 7:
								(l = r.ops.pop()), r.trys.pop();
								continue;
							default:
								if (
									((o = r.trys),
									!(o = o.length > 0 && o[o.length - 1]) &&
										(l[0] === 6 || l[0] === 2))
								) {
									r = 0;
									continue;
								}
								if (l[0] === 3 && (!o || (l[1] > o[0] && l[1] < o[3]))) {
									r.label = l[1];
									break;
								}
								if (l[0] === 6 && r.label < o[1]) {
									(r.label = o[1]), (o = l);
									break;
								}
								if (o && r.label < o[2]) {
									(r.label = o[2]), r.ops.push(l);
									break;
								}
								o[2] && r.ops.pop(), r.trys.pop();
								continue;
						}
						l = t.call(e, r);
					} catch (u) {
						(l = [6, u]), (i = 0);
					} finally {
						n = o = 0;
					}
				if (l[0] & 5) throw l[1];
				return { value: l[0] ? l[1] : void 0, done: !0 };
			}
		},
		rs = (function () {
			function e(t) {
				this.connection = t;
			}
			return (
				(e.prototype.startConnection = function (t) {
					var r = this._startPeerConnection();
					if (
						((this.connection.peerConnection = r),
						this.connection.type === tt.Media &&
							t._stream &&
							this._addTracksToConnection(t._stream, r),
						t.originator)
					) {
						if (this.connection.type === tt.Data) {
							var n = this.connection,
								i = { ordered: !!t.reliable },
								o = r.createDataChannel(n.label, i);
							n.initialize(o);
						}
						this._makeOffer();
					} else this.handleSDP('OFFER', t.sdp);
				}),
				(e.prototype._startPeerConnection = function () {
					L.default.log('Creating RTCPeerConnection.');
					var t = new RTCPeerConnection(
						this.connection.provider.options.config
					);
					return this._setupListeners(t), t;
				}),
				(e.prototype._setupListeners = function (t) {
					var r = this,
						n = this.connection.peer,
						i = this.connection.connectionId,
						o = this.connection.type,
						s = this.connection.provider;
					L.default.log('Listening for ICE candidates.'),
						(t.onicecandidate = function (c) {
							!c.candidate ||
								!c.candidate.candidate ||
								(L.default.log(
									'Received ICE candidates for '.concat(n, ':'),
									c.candidate
								),
								s.socket.send({
									type: Oe.Candidate,
									payload: { candidate: c.candidate, type: o, connectionId: i },
									dst: n,
								}));
						}),
						(t.oniceconnectionstatechange = function () {
							switch (t.iceConnectionState) {
								case 'failed':
									L.default.log(
										'iceConnectionState is failed, closing connections to ' + n
									),
										r.connection.emit(
											'error',
											new Error(
												'Negotiation of connection to ' + n + ' failed.'
											)
										),
										r.connection.close();
									break;
								case 'closed':
									L.default.log(
										'iceConnectionState is closed, closing connections to ' + n
									),
										r.connection.emit(
											'error',
											new Error('Connection to ' + n + ' closed.')
										),
										r.connection.close();
									break;
								case 'disconnected':
									L.default.log(
										'iceConnectionState changed to disconnected on the connection with ' +
											n
									);
									break;
								case 'completed':
									t.onicecandidate = ae.noop;
									break;
							}
							r.connection.emit('iceStateChanged', t.iceConnectionState);
						}),
						L.default.log('Listening for data channel'),
						(t.ondatachannel = function (c) {
							L.default.log('Received data channel');
							var a = c.channel,
								l = s.getConnection(n, i);
							l.initialize(a);
						}),
						L.default.log('Listening for remote stream'),
						(t.ontrack = function (c) {
							L.default.log('Received remote stream');
							var a = c.streams[0],
								l = s.getConnection(n, i);
							if (l.type === tt.Media) {
								var u = l;
								r._addStreamToMediaConnection(a, u);
							}
						});
				}),
				(e.prototype.cleanup = function () {
					L.default.log(
						'Cleaning up PeerConnection to ' + this.connection.peer
					);
					var t = this.connection.peerConnection;
					if (!!t) {
						(this.connection.peerConnection = null),
							(t.onicecandidate =
								t.oniceconnectionstatechange =
								t.ondatachannel =
								t.ontrack =
									function () {});
						var r = t.signalingState !== 'closed',
							n = !1;
						if (this.connection.type === tt.Data) {
							var i = this.connection,
								o = i.dataChannel;
							o && (n = !!o.readyState && o.readyState !== 'closed');
						}
						(r || n) && t.close();
					}
				}),
				(e.prototype._makeOffer = function () {
					return Yr(this, void 0, Promise, function () {
						var t, r, n, i, o, s, c;
						return Xr(this, function (a) {
							switch (a.label) {
								case 0:
									(t = this.connection.peerConnection),
										(r = this.connection.provider),
										(a.label = 1);
								case 1:
									return (
										a.trys.push([1, 7, , 8]),
										[4, t.createOffer(this.connection.options.constraints)]
									);
								case 2:
									(n = a.sent()),
										L.default.log('Created offer.'),
										this.connection.options.sdpTransform &&
											typeof this.connection.options.sdpTransform ==
												'function' &&
											(n.sdp =
												this.connection.options.sdpTransform(n.sdp) || n.sdp),
										(a.label = 3);
								case 3:
									return (
										a.trys.push([3, 5, , 6]), [4, t.setLocalDescription(n)]
									);
								case 4:
									return (
										a.sent(),
										L.default.log(
											'Set localDescription:',
											n,
											'for:'.concat(this.connection.peer)
										),
										(i = {
											sdp: n,
											type: this.connection.type,
											connectionId: this.connection.connectionId,
											metadata: this.connection.metadata,
											browser: ae.browser,
										}),
										this.connection.type === tt.Data &&
											((o = this.connection),
											(i = pn(pn({}, i), {
												label: o.label,
												reliable: o.reliable,
												serialization: o.serialization,
											}))),
										r.socket.send({
											type: Oe.Offer,
											payload: i,
											dst: this.connection.peer,
										}),
										[3, 6]
									);
								case 5:
									return (
										(s = a.sent()),
										s !=
											'OperationError: Failed to set local offer sdp: Called in wrong state: kHaveRemoteOffer' &&
											(r.emitError(Ce.WebRTC, s),
											L.default.log('Failed to setLocalDescription, ', s)),
										[3, 6]
									);
								case 6:
									return [3, 8];
								case 7:
									return (
										(c = a.sent()),
										r.emitError(Ce.WebRTC, c),
										L.default.log('Failed to createOffer, ', c),
										[3, 8]
									);
								case 8:
									return [2];
							}
						});
					});
				}),
				(e.prototype._makeAnswer = function () {
					return Yr(this, void 0, Promise, function () {
						var t, r, n, i, o;
						return Xr(this, function (s) {
							switch (s.label) {
								case 0:
									(t = this.connection.peerConnection),
										(r = this.connection.provider),
										(s.label = 1);
								case 1:
									return s.trys.push([1, 7, , 8]), [4, t.createAnswer()];
								case 2:
									(n = s.sent()),
										L.default.log('Created answer.'),
										this.connection.options.sdpTransform &&
											typeof this.connection.options.sdpTransform ==
												'function' &&
											(n.sdp =
												this.connection.options.sdpTransform(n.sdp) || n.sdp),
										(s.label = 3);
								case 3:
									return (
										s.trys.push([3, 5, , 6]), [4, t.setLocalDescription(n)]
									);
								case 4:
									return (
										s.sent(),
										L.default.log(
											'Set localDescription:',
											n,
											'for:'.concat(this.connection.peer)
										),
										r.socket.send({
											type: Oe.Answer,
											payload: {
												sdp: n,
												type: this.connection.type,
												connectionId: this.connection.connectionId,
												browser: ae.browser,
											},
											dst: this.connection.peer,
										}),
										[3, 6]
									);
								case 5:
									return (
										(i = s.sent()),
										r.emitError(Ce.WebRTC, i),
										L.default.log('Failed to setLocalDescription, ', i),
										[3, 6]
									);
								case 6:
									return [3, 8];
								case 7:
									return (
										(o = s.sent()),
										r.emitError(Ce.WebRTC, o),
										L.default.log('Failed to create answer, ', o),
										[3, 8]
									);
								case 8:
									return [2];
							}
						});
					});
				}),
				(e.prototype.handleSDP = function (t, r) {
					return Yr(this, void 0, Promise, function () {
						var n, i, o, s;
						return Xr(this, function (c) {
							switch (c.label) {
								case 0:
									(r = new RTCSessionDescription(r)),
										(n = this.connection.peerConnection),
										(i = this.connection.provider),
										L.default.log('Setting remote description', r),
										(o = this),
										(c.label = 1);
								case 1:
									return (
										c.trys.push([1, 5, , 6]), [4, n.setRemoteDescription(r)]
									);
								case 2:
									return (
										c.sent(),
										L.default.log(
											'Set remoteDescription:'
												.concat(t, ' for:')
												.concat(this.connection.peer)
										),
										t !== 'OFFER' ? [3, 4] : [4, o._makeAnswer()]
									);
								case 3:
									c.sent(), (c.label = 4);
								case 4:
									return [3, 6];
								case 5:
									return (
										(s = c.sent()),
										i.emitError(Ce.WebRTC, s),
										L.default.log('Failed to setRemoteDescription, ', s),
										[3, 6]
									);
								case 6:
									return [2];
							}
						});
					});
				}),
				(e.prototype.handleCandidate = function (t) {
					return Yr(this, void 0, Promise, function () {
						var r, n, i, o, s, c;
						return Xr(this, function (a) {
							switch (a.label) {
								case 0:
									L.default.log('handleCandidate:', t),
										(r = t.candidate),
										(n = t.sdpMLineIndex),
										(i = t.sdpMid),
										(o = this.connection.peerConnection),
										(s = this.connection.provider),
										(a.label = 1);
								case 1:
									return (
										a.trys.push([1, 3, , 4]),
										[
											4,
											o.addIceCandidate(
												new RTCIceCandidate({
													sdpMid: i,
													sdpMLineIndex: n,
													candidate: r,
												})
											),
										]
									);
								case 2:
									return (
										a.sent(),
										L.default.log(
											'Added ICE candidate for:'.concat(this.connection.peer)
										),
										[3, 4]
									);
								case 3:
									return (
										(c = a.sent()),
										s.emitError(Ce.WebRTC, c),
										L.default.log('Failed to handleCandidate, ', c),
										[3, 4]
									);
								case 4:
									return [2];
							}
						});
					});
				}),
				(e.prototype._addTracksToConnection = function (t, r) {
					if (
						(L.default.log(
							'add tracks from stream '.concat(t.id, ' to peer connection')
						),
						!r.addTrack)
					)
						return L.default.error(
							"Your browser does't support RTCPeerConnection#addTrack. Ignored."
						);
					t.getTracks().forEach(function (n) {
						r.addTrack(n, t);
					});
				}),
				(e.prototype._addStreamToMediaConnection = function (t, r) {
					L.default.log(
						'add stream '
							.concat(t.id, ' to media connection ')
							.concat(r.connectionId)
					),
						r.addStream(t);
				}),
				e
			);
		})(),
		qi = {};
	dt(
		qi,
		'BaseConnection',
		() => ns,
		(e) => (ns = e)
	);
	var Id = (function () {
			var e = function (t, r) {
				return (
					(e =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (n, i) {
								n.__proto__ = i;
							}) ||
						function (n, i) {
							for (var o in i)
								Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
						}),
					e(t, r)
				);
			};
			return function (t, r) {
				if (typeof r != 'function' && r !== null)
					throw new TypeError(
						'Class extends value ' + String(r) + ' is not a constructor or null'
					);
				e(t, r);
				function n() {
					this.constructor = t;
				}
				t.prototype =
					r === null
						? Object.create(r)
						: ((n.prototype = r.prototype), new n());
			};
		})(),
		ns = (function (e) {
			Id(t, e);
			function t(r, n, i) {
				var o = e.call(this) || this;
				return (
					(o.peer = r),
					(o.provider = n),
					(o.options = i),
					(o._open = !1),
					(o.metadata = i.metadata),
					o
				);
			}
			return (
				Object.defineProperty(t.prototype, 'open', {
					get: function () {
						return this._open;
					},
					enumerable: !1,
					configurable: !0,
				}),
				t
			);
		})(Nr.EventEmitter),
		Ad = (function () {
			var e = function (t, r) {
				return (
					(e =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (n, i) {
								n.__proto__ = i;
							}) ||
						function (n, i) {
							for (var o in i)
								Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
						}),
					e(t, r)
				);
			};
			return function (t, r) {
				if (typeof r != 'function' && r !== null)
					throw new TypeError(
						'Class extends value ' + String(r) + ' is not a constructor or null'
					);
				e(t, r);
				function n() {
					this.constructor = t;
				}
				t.prototype =
					r === null
						? Object.create(r)
						: ((n.prototype = r.prototype), new n());
			};
		})(),
		hn = function () {
			return (
				(hn =
					Object.assign ||
					function (e) {
						for (var t, r = 1, n = arguments.length; r < n; r++) {
							t = arguments[r];
							for (var i in t)
								Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						}
						return e;
					}),
				hn.apply(this, arguments)
			);
		},
		wd = function (e) {
			var t = typeof Symbol == 'function' && Symbol.iterator,
				r = t && e[t],
				n = 0;
			if (r) return r.call(e);
			if (e && typeof e.length == 'number')
				return {
					next: function () {
						return (
							e && n >= e.length && (e = void 0),
							{ value: e && e[n++], done: !e }
						);
					},
				};
			throw new TypeError(
				t ? 'Object is not iterable.' : 'Symbol.iterator is not defined.'
			);
		},
		is = (function (e) {
			Ad(t, e);
			function t(r, n, i) {
				var o = e.call(this, r, n, i) || this;
				return (
					(o._localStream = o.options._stream),
					(o.connectionId =
						o.options.connectionId || t.ID_PREFIX + ae.randomToken()),
					(o._negotiator = new Ki.Negotiator(o)),
					o._localStream &&
						o._negotiator.startConnection({
							_stream: o._localStream,
							originator: !0,
						}),
					o
				);
			}
			return (
				Object.defineProperty(t.prototype, 'type', {
					get: function () {
						return tt.Media;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'localStream', {
					get: function () {
						return this._localStream;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'remoteStream', {
					get: function () {
						return this._remoteStream;
					},
					enumerable: !1,
					configurable: !0,
				}),
				(t.prototype.addStream = function (r) {
					L.default.log('Receiving stream', r),
						(this._remoteStream = r),
						e.prototype.emit.call(this, 'stream', r);
				}),
				(t.prototype.handleMessage = function (r) {
					var n = r.type,
						i = r.payload;
					switch (r.type) {
						case Oe.Answer:
							this._negotiator.handleSDP(n, i.sdp), (this._open = !0);
							break;
						case Oe.Candidate:
							this._negotiator.handleCandidate(i.candidate);
							break;
						default:
							L.default.warn(
								'Unrecognized message type:'
									.concat(n, ' from peer:')
									.concat(this.peer)
							);
							break;
					}
				}),
				(t.prototype.answer = function (r, n) {
					var i, o;
					if ((n === void 0 && (n = {}), this._localStream)) {
						L.default.warn(
							'Local stream already exists on this MediaConnection. Are you answering a call twice?'
						);
						return;
					}
					(this._localStream = r),
						n && n.sdpTransform && (this.options.sdpTransform = n.sdpTransform),
						this._negotiator.startConnection(
							hn(hn({}, this.options._payload), { _stream: r })
						);
					var s = this.provider._getMessages(this.connectionId);
					try {
						for (var c = wd(s), a = c.next(); !a.done; a = c.next()) {
							var l = a.value;
							this.handleMessage(l);
						}
					} catch (u) {
						i = { error: u };
					} finally {
						try {
							a && !a.done && (o = c.return) && o.call(c);
						} finally {
							if (i) throw i.error;
						}
					}
					this._open = !0;
				}),
				(t.prototype.close = function () {
					this._negotiator &&
						(this._negotiator.cleanup(), (this._negotiator = null)),
						(this._localStream = null),
						(this._remoteStream = null),
						this.provider &&
							(this.provider._removeConnection(this), (this.provider = null)),
						this.options &&
							this.options._stream &&
							(this.options._stream = null),
						this.open &&
							((this._open = !1), e.prototype.emit.call(this, 'close'));
				}),
				(t.ID_PREFIX = 'mc_'),
				t
			);
		})(qi.BaseConnection),
		Ci = {};
	dt(
		Ci,
		'DataConnection',
		() => ss,
		(e) => (ss = e)
	);
	var mc = {};
	dt(
		mc,
		'EncodingQueue',
		() => os,
		(e) => (os = e)
	);
	var jd = (function () {
			var e = function (t, r) {
				return (
					(e =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (n, i) {
								n.__proto__ = i;
							}) ||
						function (n, i) {
							for (var o in i)
								Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
						}),
					e(t, r)
				);
			};
			return function (t, r) {
				if (typeof r != 'function' && r !== null)
					throw new TypeError(
						'Class extends value ' + String(r) + ' is not a constructor or null'
					);
				e(t, r);
				function n() {
					this.constructor = t;
				}
				t.prototype =
					r === null
						? Object.create(r)
						: ((n.prototype = r.prototype), new n());
			};
		})(),
		os = (function (e) {
			jd(t, e);
			function t() {
				var r = e.call(this) || this;
				return (
					(r.fileReader = new FileReader()),
					(r._queue = []),
					(r._processing = !1),
					(r.fileReader.onload = function (n) {
						(r._processing = !1),
							n.target && r.emit('done', n.target.result),
							r.doNextTask();
					}),
					(r.fileReader.onerror = function (n) {
						L.default.error('EncodingQueue error:', n),
							(r._processing = !1),
							r.destroy(),
							r.emit('error', n);
					}),
					r
				);
			}
			return (
				Object.defineProperty(t.prototype, 'queue', {
					get: function () {
						return this._queue;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'size', {
					get: function () {
						return this.queue.length;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'processing', {
					get: function () {
						return this._processing;
					},
					enumerable: !1,
					configurable: !0,
				}),
				(t.prototype.enque = function (r) {
					this.queue.push(r), !this.processing && this.doNextTask();
				}),
				(t.prototype.destroy = function () {
					this.fileReader.abort(), (this._queue = []);
				}),
				(t.prototype.doNextTask = function () {
					this.size !== 0 &&
						(this.processing ||
							((this._processing = !0),
							this.fileReader.readAsArrayBuffer(this.queue.shift())));
				}),
				t
			);
		})(Nr.EventEmitter),
		Fd = (function () {
			var e = function (t, r) {
				return (
					(e =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (n, i) {
								n.__proto__ = i;
							}) ||
						function (n, i) {
							for (var o in i)
								Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
						}),
					e(t, r)
				);
			};
			return function (t, r) {
				if (typeof r != 'function' && r !== null)
					throw new TypeError(
						'Class extends value ' + String(r) + ' is not a constructor or null'
					);
				e(t, r);
				function n() {
					this.constructor = t;
				}
				t.prototype =
					r === null
						? Object.create(r)
						: ((n.prototype = r.prototype), new n());
			};
		})(),
		Bd = function (e) {
			var t = typeof Symbol == 'function' && Symbol.iterator,
				r = t && e[t],
				n = 0;
			if (r) return r.call(e);
			if (e && typeof e.length == 'number')
				return {
					next: function () {
						return (
							e && n >= e.length && (e = void 0),
							{ value: e && e[n++], done: !e }
						);
					},
				};
			throw new TypeError(
				t ? 'Object is not iterable.' : 'Symbol.iterator is not defined.'
			);
		},
		ss = (function (e) {
			Fd(t, e);
			function t(r, n, i) {
				var o = e.call(this, r, n, i) || this;
				return (
					(o.stringify = JSON.stringify),
					(o.parse = JSON.parse),
					(o._buffer = []),
					(o._bufferSize = 0),
					(o._buffering = !1),
					(o._chunkedData = {}),
					(o._encodingQueue = new mc.EncodingQueue()),
					(o.connectionId =
						o.options.connectionId || t.ID_PREFIX + ae.randomToken()),
					(o.label = o.options.label || o.connectionId),
					(o.serialization = o.options.serialization || ht.Binary),
					(o.reliable = !!o.options.reliable),
					o._encodingQueue.on('done', function (s) {
						o._bufferedSend(s);
					}),
					o._encodingQueue.on('error', function () {
						L.default.error(
							'DC#'.concat(
								o.connectionId,
								': Error occured in encoding from blob to arraybuffer, close DC'
							)
						),
							o.close();
					}),
					(o._negotiator = new Ki.Negotiator(o)),
					o._negotiator.startConnection(
						o.options._payload || { originator: !0 }
					),
					o
				);
			}
			return (
				Object.defineProperty(t.prototype, 'type', {
					get: function () {
						return tt.Data;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'dataChannel', {
					get: function () {
						return this._dc;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'bufferSize', {
					get: function () {
						return this._bufferSize;
					},
					enumerable: !1,
					configurable: !0,
				}),
				(t.prototype.initialize = function (r) {
					(this._dc = r), this._configureDataChannel();
				}),
				(t.prototype._configureDataChannel = function () {
					var r = this;
					(!ae.supports.binaryBlob || ae.supports.reliable) &&
						(this.dataChannel.binaryType = 'arraybuffer'),
						(this.dataChannel.onopen = function () {
							L.default.log(
								'DC#'.concat(r.connectionId, ' dc connection success')
							),
								(r._open = !0),
								r.emit('open');
						}),
						(this.dataChannel.onmessage = function (n) {
							L.default.log(
								'DC#'.concat(r.connectionId, ' dc onmessage:'),
								n.data
							),
								r._handleDataMessage(n);
						}),
						(this.dataChannel.onclose = function () {
							L.default.log(
								'DC#'.concat(r.connectionId, ' dc closed for:'),
								r.peer
							),
								r.close();
						});
				}),
				(t.prototype._handleDataMessage = function (r) {
					var n = this,
						i = r.data,
						o = i.constructor,
						s =
							this.serialization === ht.Binary ||
							this.serialization === ht.BinaryUTF8,
						c = i;
					if (s) {
						if (o === Blob) {
							ae.blobToArrayBuffer(i, function (l) {
								var u = ae.unpack(l);
								n.emit('data', u);
							});
							return;
						} else if (o === ArrayBuffer) c = ae.unpack(i);
						else if (o === String) {
							var a = ae.binaryStringToArrayBuffer(i);
							c = ae.unpack(a);
						}
					} else this.serialization === ht.JSON && (c = this.parse(i));
					if (c.__peerData) {
						this._handleChunk(c);
						return;
					}
					e.prototype.emit.call(this, 'data', c);
				}),
				(t.prototype._handleChunk = function (r) {
					var n = r.__peerData,
						i = this._chunkedData[n] || { data: [], count: 0, total: r.total };
					if (
						((i.data[r.n] = r.data),
						i.count++,
						(this._chunkedData[n] = i),
						i.total === i.count)
					) {
						delete this._chunkedData[n];
						var o = new Blob(i.data);
						this._handleDataMessage({ data: o });
					}
				}),
				(t.prototype.close = function () {
					(this._buffer = []),
						(this._bufferSize = 0),
						(this._chunkedData = {}),
						this._negotiator &&
							(this._negotiator.cleanup(), (this._negotiator = null)),
						this.provider &&
							(this.provider._removeConnection(this), (this.provider = null)),
						this.dataChannel &&
							((this.dataChannel.onopen = null),
							(this.dataChannel.onmessage = null),
							(this.dataChannel.onclose = null),
							(this._dc = null)),
						this._encodingQueue &&
							(this._encodingQueue.destroy(),
							this._encodingQueue.removeAllListeners(),
							(this._encodingQueue = null)),
						this.open &&
							((this._open = !1), e.prototype.emit.call(this, 'close'));
				}),
				(t.prototype.send = function (r, n) {
					if (!this.open) {
						e.prototype.emit.call(
							this,
							'error',
							new Error(
								'Connection is not open. You should listen for the `open` event before sending messages.'
							)
						);
						return;
					}
					if (this.serialization === ht.JSON)
						this._bufferedSend(this.stringify(r));
					else if (
						this.serialization === ht.Binary ||
						this.serialization === ht.BinaryUTF8
					) {
						var i = ae.pack(r);
						if (!n && i.size > ae.chunkedMTU) {
							this._sendChunks(i);
							return;
						}
						ae.supports.binaryBlob
							? this._bufferedSend(i)
							: this._encodingQueue.enque(i);
					} else this._bufferedSend(r);
				}),
				(t.prototype._bufferedSend = function (r) {
					(this._buffering || !this._trySend(r)) &&
						(this._buffer.push(r), (this._bufferSize = this._buffer.length));
				}),
				(t.prototype._trySend = function (r) {
					var n = this;
					if (!this.open) return !1;
					if (this.dataChannel.bufferedAmount > t.MAX_BUFFERED_AMOUNT)
						return (
							(this._buffering = !0),
							setTimeout(function () {
								(n._buffering = !1), n._tryBuffer();
							}, 50),
							!1
						);
					try {
						this.dataChannel.send(r);
					} catch (i) {
						return (
							L.default.error(
								'DC#:'.concat(this.connectionId, ' Error when sending:'),
								i
							),
							(this._buffering = !0),
							this.close(),
							!1
						);
					}
					return !0;
				}),
				(t.prototype._tryBuffer = function () {
					if (!!this.open && this._buffer.length !== 0) {
						var r = this._buffer[0];
						this._trySend(r) &&
							(this._buffer.shift(),
							(this._bufferSize = this._buffer.length),
							this._tryBuffer());
					}
				}),
				(t.prototype._sendChunks = function (r) {
					var n,
						i,
						o = ae.chunk(r);
					L.default.log(
						'DC#'
							.concat(this.connectionId, ' Try to send ')
							.concat(o.length, ' chunks...')
					);
					try {
						for (var s = Bd(o), c = s.next(); !c.done; c = s.next()) {
							var a = c.value;
							this.send(a, !0);
						}
					} catch (l) {
						n = { error: l };
					} finally {
						try {
							c && !c.done && (i = s.return) && i.call(s);
						} finally {
							if (n) throw n.error;
						}
					}
				}),
				(t.prototype.handleMessage = function (r) {
					var n = r.payload;
					switch (r.type) {
						case Oe.Answer:
							this._negotiator.handleSDP(r.type, n.sdp);
							break;
						case Oe.Candidate:
							this._negotiator.handleCandidate(n.candidate);
							break;
						default:
							L.default.warn(
								'Unrecognized message type:',
								r.type,
								'from peer:',
								this.peer
							);
							break;
					}
				}),
				(t.ID_PREFIX = 'dc_'),
				(t.MAX_BUFFERED_AMOUNT = 8388608),
				t
			);
		})(qi.BaseConnection),
		gc = {};
	dt(
		gc,
		'API',
		() => ls,
		(e) => (ls = e)
	);
	var as = function (e, t, r, n) {
			function i(o) {
				return o instanceof r
					? o
					: new r(function (s) {
							s(o);
					  });
			}
			return new (r || (r = Promise))(function (o, s) {
				function c(u) {
					try {
						l(n.next(u));
					} catch (f) {
						s(f);
					}
				}
				function a(u) {
					try {
						l(n.throw(u));
					} catch (f) {
						s(f);
					}
				}
				function l(u) {
					u.done ? o(u.value) : i(u.value).then(c, a);
				}
				l((n = n.apply(e, t || [])).next());
			});
		},
		cs = function (e, t) {
			var r = {
					label: 0,
					sent: function () {
						if (o[0] & 1) throw o[1];
						return o[1];
					},
					trys: [],
					ops: [],
				},
				n,
				i,
				o,
				s;
			return (
				(s = { next: c(0), throw: c(1), return: c(2) }),
				typeof Symbol == 'function' &&
					(s[Symbol.iterator] = function () {
						return this;
					}),
				s
			);
			function c(l) {
				return function (u) {
					return a([l, u]);
				};
			}
			function a(l) {
				if (n) throw new TypeError('Generator is already executing.');
				for (; r; )
					try {
						if (
							((n = 1),
							i &&
								(o =
									l[0] & 2
										? i.return
										: l[0]
										? i.throw || ((o = i.return) && o.call(i), 0)
										: i.next) &&
								!(o = o.call(i, l[1])).done)
						)
							return o;
						switch (((i = 0), o && (l = [l[0] & 2, o.value]), l[0])) {
							case 0:
							case 1:
								o = l;
								break;
							case 4:
								return r.label++, { value: l[1], done: !1 };
							case 5:
								r.label++, (i = l[1]), (l = [0]);
								continue;
							case 7:
								(l = r.ops.pop()), r.trys.pop();
								continue;
							default:
								if (
									((o = r.trys),
									!(o = o.length > 0 && o[o.length - 1]) &&
										(l[0] === 6 || l[0] === 2))
								) {
									r = 0;
									continue;
								}
								if (l[0] === 3 && (!o || (l[1] > o[0] && l[1] < o[3]))) {
									r.label = l[1];
									break;
								}
								if (l[0] === 6 && r.label < o[1]) {
									(r.label = o[1]), (o = l);
									break;
								}
								if (o && r.label < o[2]) {
									(r.label = o[2]), r.ops.push(l);
									break;
								}
								o[2] && r.ops.pop(), r.trys.pop();
								continue;
						}
						l = t.call(e, r);
					} catch (u) {
						(l = [6, u]), (i = 0);
					} finally {
						n = o = 0;
					}
				if (l[0] & 5) throw l[1];
				return { value: l[0] ? l[1] : void 0, done: !0 };
			}
		},
		ls = (function () {
			function e(t) {
				this._options = t;
			}
			return (
				(e.prototype._buildRequest = function (t) {
					var r = this._options.secure ? 'https' : 'http',
						n = this._options,
						i = n.host,
						o = n.port,
						s = n.path,
						c = n.key,
						a = new URL(
							''
								.concat(r, '://')
								.concat(i, ':')
								.concat(o)
								.concat(s)
								.concat(c, '/')
								.concat(t)
						);
					return (
						a.searchParams.set(
							'ts',
							''.concat(Date.now()).concat(Math.random())
						),
						a.searchParams.set('version', Ji.version),
						fetch(a.href, { referrerPolicy: this._options.referrerPolicy })
					);
				}),
				(e.prototype.retrieveId = function () {
					return as(this, void 0, Promise, function () {
						var t, r, n;
						return cs(this, function (i) {
							switch (i.label) {
								case 0:
									return (
										i.trys.push([0, 2, , 3]), [4, this._buildRequest('id')]
									);
								case 1:
									if (((t = i.sent()), t.status !== 200))
										throw new Error('Error. Status:'.concat(t.status));
									return [2, t.text()];
								case 2:
									throw (
										((r = i.sent()),
										L.default.error('Error retrieving ID', r),
										(n = ''),
										this._options.path === '/' &&
											this._options.host !== ae.CLOUD_HOST &&
											(n =
												" If you passed in a `path` to your self-hosted PeerServer, you'll also need to pass in that same path when creating a new Peer."),
										new Error('Could not get an ID from the server.' + n))
									);
								case 3:
									return [2];
							}
						});
					});
				}),
				(e.prototype.listAllPeers = function () {
					return as(this, void 0, Promise, function () {
						var t, r, n;
						return cs(this, function (i) {
							switch (i.label) {
								case 0:
									return (
										i.trys.push([0, 2, , 3]), [4, this._buildRequest('peers')]
									);
								case 1:
									if (((t = i.sent()), t.status !== 200))
										throw t.status === 401
											? ((r = ''),
											  this._options.host === ae.CLOUD_HOST
													? (r =
															"It looks like you're using the cloud server. You can email team@peerjs.com to enable peer listing for your API key.")
													: (r =
															'You need to enable `allow_discovery` on your self-hosted PeerServer to use this feature.'),
											  new Error(
													"It doesn't look like you have permission to list peers IDs. " +
														r
											  ))
											: new Error('Error. Status:'.concat(t.status));
									return [2, t.json()];
								case 2:
									throw (
										((n = i.sent()),
										L.default.error('Error retrieving list peers', n),
										new Error('Could not get list peers from the server.' + n))
									);
								case 3:
									return [2];
							}
						});
					});
				}),
				e
			);
		})(),
		Ld = (function () {
			var e = function (t, r) {
				return (
					(e =
						Object.setPrototypeOf ||
						({ __proto__: [] } instanceof Array &&
							function (n, i) {
								n.__proto__ = i;
							}) ||
						function (n, i) {
							for (var o in i)
								Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
						}),
					e(t, r)
				);
			};
			return function (t, r) {
				if (typeof r != 'function' && r !== null)
					throw new TypeError(
						'Class extends value ' + String(r) + ' is not a constructor or null'
					);
				e(t, r);
				function n() {
					this.constructor = t;
				}
				t.prototype =
					r === null
						? Object.create(r)
						: ((n.prototype = r.prototype), new n());
			};
		})(),
		Dr = function () {
			return (
				(Dr =
					Object.assign ||
					function (e) {
						for (var t, r = 1, n = arguments.length; r < n; r++) {
							t = arguments[r];
							for (var i in t)
								Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						}
						return e;
					}),
				Dr.apply(this, arguments)
			);
		},
		_r = function (e) {
			var t = typeof Symbol == 'function' && Symbol.iterator,
				r = t && e[t],
				n = 0;
			if (r) return r.call(e);
			if (e && typeof e.length == 'number')
				return {
					next: function () {
						return (
							e && n >= e.length && (e = void 0),
							{ value: e && e[n++], done: !e }
						);
					},
				};
			throw new TypeError(
				t ? 'Object is not iterable.' : 'Symbol.iterator is not defined.'
			);
		},
		$d = function (e, t) {
			var r = typeof Symbol == 'function' && e[Symbol.iterator];
			if (!r) return e;
			var n = r.call(e),
				i,
				o = [],
				s;
			try {
				for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; )
					o.push(i.value);
			} catch (c) {
				s = { error: c };
			} finally {
				try {
					i && !i.done && (r = n.return) && r.call(n);
				} finally {
					if (s) throw s.error;
				}
			}
			return o;
		},
		us = (function (e) {
			Ld(t, e);
			function t(r, n) {
				var i = e.call(this) || this;
				(i._id = null),
					(i._lastServerId = null),
					(i._destroyed = !1),
					(i._disconnected = !1),
					(i._open = !1),
					(i._connections = new Map()),
					(i._lostMessages = new Map());
				var o;
				return (
					r && r.constructor == Object ? (n = r) : r && (o = r.toString()),
					(n = Dr(
						{
							debug: 0,
							host: ae.CLOUD_HOST,
							port: ae.CLOUD_PORT,
							path: '/',
							key: t.DEFAULT_KEY,
							token: ae.randomToken(),
							config: ae.defaultConfig,
							referrerPolicy: 'strict-origin-when-cross-origin',
						},
						n
					)),
					(i._options = n),
					i._options.host === '/' &&
						(i._options.host = window.location.hostname),
					i._options.path &&
						(i._options.path[0] !== '/' &&
							(i._options.path = '/' + i._options.path),
						i._options.path[i._options.path.length - 1] !== '/' &&
							(i._options.path += '/')),
					i._options.secure === void 0 && i._options.host !== ae.CLOUD_HOST
						? (i._options.secure = ae.isSecure())
						: i._options.host == ae.CLOUD_HOST && (i._options.secure = !0),
					i._options.logFunction &&
						L.default.setLogFunction(i._options.logFunction),
					(L.default.logLevel = i._options.debug || 0),
					(i._api = new gc.API(n)),
					(i._socket = i._createServerConnection()),
					!ae.supports.audioVideo && !ae.supports.data
						? (i._delayedAbort(
								Ce.BrowserIncompatible,
								'The current browser does not support WebRTC'
						  ),
						  i)
						: !!o && !ae.validateId(o)
						? (i._delayedAbort(Ce.InvalidID, 'ID "'.concat(o, '" is invalid')),
						  i)
						: (o
								? i._initialize(o)
								: i._api
										.retrieveId()
										.then(function (s) {
											return i._initialize(s);
										})
										.catch(function (s) {
											return i._abort(Ce.ServerError, s);
										}),
						  i)
				);
			}
			return (
				Object.defineProperty(t.prototype, 'id', {
					get: function () {
						return this._id;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'options', {
					get: function () {
						return this._options;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'open', {
					get: function () {
						return this._open;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'socket', {
					get: function () {
						return this._socket;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'connections', {
					get: function () {
						var r,
							n,
							i = Object.create(null);
						try {
							for (
								var o = _r(this._connections), s = o.next();
								!s.done;
								s = o.next()
							) {
								var c = $d(s.value, 2),
									a = c[0],
									l = c[1];
								i[a] = l;
							}
						} catch (u) {
							r = { error: u };
						} finally {
							try {
								s && !s.done && (n = o.return) && n.call(o);
							} finally {
								if (r) throw r.error;
							}
						}
						return i;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'destroyed', {
					get: function () {
						return this._destroyed;
					},
					enumerable: !1,
					configurable: !0,
				}),
				Object.defineProperty(t.prototype, 'disconnected', {
					get: function () {
						return this._disconnected;
					},
					enumerable: !1,
					configurable: !0,
				}),
				(t.prototype._createServerConnection = function () {
					var r = this,
						n = new hc.Socket(
							this._options.secure,
							this._options.host,
							this._options.port,
							this._options.path,
							this._options.key,
							this._options.pingInterval
						);
					return (
						n.on(vt.Message, function (i) {
							r._handleMessage(i);
						}),
						n.on(vt.Error, function (i) {
							r._abort(Ce.SocketError, i);
						}),
						n.on(vt.Disconnected, function () {
							r.disconnected ||
								(r.emitError(Ce.Network, 'Lost connection to server.'),
								r.disconnect());
						}),
						n.on(vt.Close, function () {
							r.disconnected ||
								r._abort(
									Ce.SocketClosed,
									'Underlying socket is already closed.'
								);
						}),
						n
					);
				}),
				(t.prototype._initialize = function (r) {
					(this._id = r), this.socket.start(r, this._options.token);
				}),
				(t.prototype._handleMessage = function (r) {
					var n,
						i,
						o = r.type,
						s = r.payload,
						c = r.src;
					switch (o) {
						case Oe.Open:
							(this._lastServerId = this.id),
								(this._open = !0),
								this.emit('open', this.id);
							break;
						case Oe.Error:
							this._abort(Ce.ServerError, s.msg);
							break;
						case Oe.IdTaken:
							this._abort(
								Ce.UnavailableID,
								'ID "'.concat(this.id, '" is taken')
							);
							break;
						case Oe.InvalidKey:
							this._abort(
								Ce.InvalidKey,
								'API KEY "'.concat(this._options.key, '" is invalid')
							);
							break;
						case Oe.Leave:
							L.default.log('Received leave message from '.concat(c)),
								this._cleanupPeer(c),
								this._connections.delete(c);
							break;
						case Oe.Expire:
							this.emitError(
								Ce.PeerUnavailable,
								'Could not connect to peer '.concat(c)
							);
							break;
						case Oe.Offer:
							var g = s.connectionId,
								_ = this.getConnection(c, g);
							if (
								(_ &&
									(_.close(),
									L.default.warn(
										'Offer received for existing Connection ID:'.concat(g)
									)),
								s.type === tt.Media)
							) {
								var a = new bi.MediaConnection(c, this, {
									connectionId: g,
									_payload: s,
									metadata: s.metadata,
								});
								(_ = a), this._addConnection(c, _), this.emit('call', a);
							} else if (s.type === tt.Data) {
								var l = new Ci.DataConnection(c, this, {
									connectionId: g,
									_payload: s,
									metadata: s.metadata,
									label: s.label,
									serialization: s.serialization,
									reliable: s.reliable,
								});
								(_ = l), this._addConnection(c, _), this.emit('connection', l);
							} else {
								L.default.warn(
									'Received malformed connection type:'.concat(s.type)
								);
								return;
							}
							var u = this._getMessages(g);
							try {
								for (var f = _r(u), d = f.next(); !d.done; d = f.next()) {
									var h = d.value;
									_.handleMessage(h);
								}
							} catch (R) {
								n = { error: R };
							} finally {
								try {
									d && !d.done && (i = f.return) && i.call(f);
								} finally {
									if (n) throw n.error;
								}
							}
							break;
						default:
							if (!s) {
								L.default.warn(
									'You received a malformed message from '
										.concat(c, ' of type ')
										.concat(o)
								);
								return;
							}
							var g = s.connectionId,
								_ = this.getConnection(c, g);
							_ && _.peerConnection
								? _.handleMessage(r)
								: g
								? this._storeMessage(g, r)
								: L.default.warn('You received an unrecognized message:', r);
							break;
					}
				}),
				(t.prototype._storeMessage = function (r, n) {
					this._lostMessages.has(r) || this._lostMessages.set(r, []),
						this._lostMessages.get(r).push(n);
				}),
				(t.prototype._getMessages = function (r) {
					var n = this._lostMessages.get(r);
					return n ? (this._lostMessages.delete(r), n) : [];
				}),
				(t.prototype.connect = function (r, n) {
					if ((n === void 0 && (n = {}), this.disconnected)) {
						L.default.warn(
							'You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect, or call reconnect on this peer if you believe its ID to still be available.'
						),
							this.emitError(
								Ce.Disconnected,
								'Cannot connect to new Peer after disconnecting from server.'
							);
						return;
					}
					var i = new Ci.DataConnection(r, this, n);
					return this._addConnection(r, i), i;
				}),
				(t.prototype.call = function (r, n, i) {
					if ((i === void 0 && (i = {}), this.disconnected)) {
						L.default.warn(
							'You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect.'
						),
							this.emitError(
								Ce.Disconnected,
								'Cannot connect to new Peer after disconnecting from server.'
							);
						return;
					}
					if (!n) {
						L.default.error(
							"To call a peer, you must provide a stream from your browser's `getUserMedia`."
						);
						return;
					}
					var o = new bi.MediaConnection(
						r,
						this,
						Dr(Dr({}, i), { _stream: n })
					);
					return this._addConnection(r, o), o;
				}),
				(t.prototype._addConnection = function (r, n) {
					L.default.log(
						'add connection '
							.concat(n.type, ':')
							.concat(n.connectionId, ' to peerId:')
							.concat(r)
					),
						this._connections.has(r) || this._connections.set(r, []),
						this._connections.get(r).push(n);
				}),
				(t.prototype._removeConnection = function (r) {
					var n = this._connections.get(r.peer);
					if (n) {
						var i = n.indexOf(r);
						i !== -1 && n.splice(i, 1);
					}
					this._lostMessages.delete(r.connectionId);
				}),
				(t.prototype.getConnection = function (r, n) {
					var i,
						o,
						s = this._connections.get(r);
					if (!s) return null;
					try {
						for (var c = _r(s), a = c.next(); !a.done; a = c.next()) {
							var l = a.value;
							if (l.connectionId === n) return l;
						}
					} catch (u) {
						i = { error: u };
					} finally {
						try {
							a && !a.done && (o = c.return) && o.call(c);
						} finally {
							if (i) throw i.error;
						}
					}
					return null;
				}),
				(t.prototype._delayedAbort = function (r, n) {
					var i = this;
					setTimeout(function () {
						i._abort(r, n);
					}, 0);
				}),
				(t.prototype._abort = function (r, n) {
					L.default.error('Aborting!'),
						this.emitError(r, n),
						this._lastServerId ? this.disconnect() : this.destroy();
				}),
				(t.prototype.emitError = function (r, n) {
					L.default.error('Error:', n);
					var i;
					typeof n == 'string' ? (i = new Error(n)) : (i = n),
						(i.type = r),
						this.emit('error', i);
				}),
				(t.prototype.destroy = function () {
					this.destroyed ||
						(L.default.log('Destroy peer with ID:'.concat(this.id)),
						this.disconnect(),
						this._cleanup(),
						(this._destroyed = !0),
						this.emit('close'));
				}),
				(t.prototype._cleanup = function () {
					var r, n;
					try {
						for (
							var i = _r(this._connections.keys()), o = i.next();
							!o.done;
							o = i.next()
						) {
							var s = o.value;
							this._cleanupPeer(s), this._connections.delete(s);
						}
					} catch (c) {
						r = { error: c };
					} finally {
						try {
							o && !o.done && (n = i.return) && n.call(i);
						} finally {
							if (r) throw r.error;
						}
					}
					this.socket.removeAllListeners();
				}),
				(t.prototype._cleanupPeer = function (r) {
					var n,
						i,
						o = this._connections.get(r);
					if (!!o)
						try {
							for (var s = _r(o), c = s.next(); !c.done; c = s.next()) {
								var a = c.value;
								a.close();
							}
						} catch (l) {
							n = { error: l };
						} finally {
							try {
								c && !c.done && (i = s.return) && i.call(s);
							} finally {
								if (n) throw n.error;
							}
						}
				}),
				(t.prototype.disconnect = function () {
					if (!this.disconnected) {
						var r = this.id;
						L.default.log('Disconnect peer with ID:'.concat(r)),
							(this._disconnected = !0),
							(this._open = !1),
							this.socket.close(),
							(this._lastServerId = r),
							(this._id = null),
							this.emit('disconnected', r);
					}
				}),
				(t.prototype.reconnect = function () {
					if (this.disconnected && !this.destroyed)
						L.default.log(
							'Attempting reconnection to server with ID '.concat(
								this._lastServerId
							)
						),
							(this._disconnected = !1),
							this._initialize(this._lastServerId);
					else {
						if (this.destroyed)
							throw new Error(
								'This peer cannot reconnect to the server. It has already been destroyed.'
							);
						if (!this.disconnected && !this.open)
							L.default.error(
								"In a hurry? We're still trying to make the initial connection!"
							);
						else
							throw new Error(
								'Peer '.concat(
									this.id,
									' cannot reconnect because it is not disconnected from the server!'
								)
							);
					}
				}),
				(t.prototype.listAllPeers = function (r) {
					var n = this;
					r === void 0 && (r = function (i) {}),
						this._api
							.listAllPeers()
							.then(function (i) {
								return r(i);
							})
							.catch(function (i) {
								return n._abort(Ce.ServerError, i);
							});
				}),
				(t.DEFAULT_KEY = 'peerjs'),
				t
			);
		})(Nr.EventEmitter),
		fs = dc.Peer;
	const Nd = Ca('peer', () => {
			const e = fe(),
				t = fe(!1),
				r = fe(!1),
				n = Et(),
				i = Et(),
				o = Et(),
				s = Et();
			let c, a, l;
			const u = () => {
					(r.value = !0), n.trigger();
				},
				f = () => {
					(r.value = !1), i.trigger();
				},
				d = (b) => {
					o.trigger(b);
				},
				h = (b) => {
					s.trigger(b);
				},
				g = (b) => {
					b ? (l = new fs(b, { debug: 2 })) : (l = new fs({ debug: 2 })),
						l.on('open', () => {
							(t.value = !0), l && (e.value = l.id);
						}),
						l.on('close', () => {
							t.value = !1;
						}),
						l.on('connection', (P) => {
							(a = P),
								a.on('open', u),
								a.on('close', f),
								a.on('error', d),
								a.on('data', h);
						}),
						l.on('disconnected', () => {
							i.trigger();
						}),
						l.on('error', (P) => {
							o.trigger(P);
						});
				},
				_ = () => {
					l && l.destroy(), (l = void 0);
				},
				R = async (b) => {
					await Rf(t).toBeTruthy(),
						l && (c = l.connect(b)),
						c.on('open', u),
						c.on('close', f),
						c.on('error', d),
						c.on('data', h);
				},
				S = async () => {
					l && l.disconnect();
				},
				j = (b, P) => {
					a
						? a.send({ message: b, payload: P })
						: c && c.send({ message: b, payload: P });
				},
				D = (b, P) => {
					s.on((W) => {
						W.message === b && P(W.payload);
					});
				};
			return {
				id: e,
				isOpen: t,
				isConnected: r,
				createPeer: g,
				destroyPeer: _,
				connect: R,
				disconnect: S,
				sendMessage: j,
				onConnected: n.on,
				onDisconnected: i.on,
				onError: o.on,
				onMessage: D,
			};
		}),
		Xt = Ca('game', () => {
			const e = ed('highScore', 0),
				t = Nd(),
				r = No(),
				n = No(),
				i = Et(),
				o = Et(),
				s = fe(!1),
				c = fe(!1),
				a = () => {
					t.createPeer(), (s.value = !0);
				},
				l = () => {
					t.destroyPeer(),
						(s.value = !1),
						new URLSearchParams(window.location.search).delete('game'),
						window.history.pushState({}, '', window.location.pathname),
						n.init(Math.random());
				},
				u = (g) => {
					a(), t.connect(g);
				},
				f = () => {
					t.disconnect(), l();
				},
				d = (g = !1) => {
					const _ = Math.random();
					r.init(_),
						c.value && t.sendMessage('new-game', { seed: _, silent: g });
				};
			t.onConnected(() => {
				(c.value = !0), d();
			}),
				t.onDisconnected(() => {
					c.value = !1;
				}),
				r.onMove((g) => t.sendMessage('move', { direction: g })),
				t.onMessage('new-game', ({ seed: g, silent: _ }) => {
					n.init(g), _ || d(!0);
				}),
				t.onMessage('move', ({ direction: g }) => n.move(g)),
				We(r.score, () => {
					r.score.value > e.value && (e.value = r.score.value);
				});
			const h = ke(() => s.value && !c.value);
			return (
				d(),
				{
					openMultiplayerGame: a,
					closeMultiplayerGame: l,
					localGame: r,
					remoteGame: n,
					highScore: e,
					startNewGame: d,
					isMultiplayerGameOpen: Pr(s),
					isRemotePlayerConnected: Pr(c),
					isWaitingForOtherPlayer: Pr(h),
					joinMultiplayerGame: u,
					leaveMultiplayerGame: f,
					link: ke(
						() =>
							`${window.location.origin}/gameTogether/gameTogeher.html?game=${t.id}`
					),
					onRemotePlayerJoined: i.on,
					onRemotePlayerLeft: o.on,
				}
			);
		}),
		Ud = { flex: '', 'max-w': '600px', 'w-full': '', 'mx-auto': '' },
		Gd = J('span', { 'flex-1': '' }, null, -1),
		zd = { 'text-left': '' },
		Wd = {
			'text-8xl': '',
			'font-black': '',
			'font-mono': '',
			'text-light-800': '',
			'leading-18': '',
			'text-right': '',
		},
		Hd = J(
			'div',
			{ 'text-3xl': '', 'font-mono': '', op50: '', 'text-right': '' },
			'\u5F53\u524D\u5206\u6570',
			-1
		),
		Vd = J(
			'div',
			{ op50: '', 'text-right': '' },
			'\u6309\u65B9\u5411\u952E\u79FB\u52A8\u65B9\u5757',
			-1
		),
		Jd = it({
			__name: 'RemoateGameStatus',
			setup(e) {
				const t = Xt(),
					r = Oa(
						ke(() => t.remoteGame.score),
						{ duration: 100 }
					);
				return (n, i) => (
					de(),
					ye('div', Ud, [
						Gd,
						J('div', zd, [J('div', Wd, Wt(Y(r).toFixed(0)), 1), Hd, Vd]),
					])
				);
			},
		});
	var Ur = {};
	(function e(t, r, n, i) {
		var o = !!(
			t.Worker &&
			t.Blob &&
			t.Promise &&
			t.OffscreenCanvas &&
			t.OffscreenCanvasRenderingContext2D &&
			t.HTMLCanvasElement &&
			t.HTMLCanvasElement.prototype.transferControlToOffscreen &&
			t.URL &&
			t.URL.createObjectURL
		);
		function s() {}
		function c(y) {
			var v = r.exports.Promise,
				G = v !== void 0 ? v : t.Promise;
			return typeof G == 'function' ? new G(y) : (y(s, s), null);
		}
		var a = (function () {
				var y = Math.floor(16.666666666666668),
					v,
					G,
					N = {},
					$ = 0;
				return (
					typeof requestAnimationFrame == 'function' &&
					typeof cancelAnimationFrame == 'function'
						? ((v = function (Z) {
								var ee = Math.random();
								return (
									(N[ee] = requestAnimationFrame(function ne(ce) {
										$ === ce || $ + y - 1 < ce
											? (($ = ce), delete N[ee], Z())
											: (N[ee] = requestAnimationFrame(ne));
									})),
									ee
								);
						  }),
						  (G = function (Z) {
								N[Z] && cancelAnimationFrame(N[Z]);
						  }))
						: ((v = function (Z) {
								return setTimeout(Z, y);
						  }),
						  (G = function (Z) {
								return clearTimeout(Z);
						  })),
					{ frame: v, cancel: G }
				);
			})(),
			l = (function () {
				var y,
					v,
					G = {};
				function N($) {
					function Z(ee, ne) {
						$.postMessage({ options: ee || {}, callback: ne });
					}
					($.init = function (ne) {
						var ce = ne.transferControlToOffscreen();
						$.postMessage({ canvas: ce }, [ce]);
					}),
						($.fire = function (ne, ce, Se) {
							if (v) return Z(ne, null), v;
							var le = Math.random().toString(36).slice(2);
							return (
								(v = c(function (Je) {
									function Te(ie) {
										ie.data.callback === le &&
											(delete G[le],
											$.removeEventListener('message', Te),
											(v = null),
											Se(),
											Je());
									}
									$.addEventListener('message', Te),
										Z(ne, le),
										(G[le] = Te.bind(null, { data: { callback: le } }));
								})),
								v
							);
						}),
						($.reset = function () {
							$.postMessage({ reset: !0 });
							for (var ne in G) G[ne](), delete G[ne];
						});
				}
				return function () {
					if (y) return y;
					if (!n && o) {
						var $ = [
							'var CONFETTI, SIZE = {}, module = {};',
							'(' + e.toString() + ')(this, module, true, SIZE);',
							'onmessage = function(msg) {',
							'  if (msg.data.options) {',
							'    CONFETTI(msg.data.options).then(function () {',
							'      if (msg.data.callback) {',
							'        postMessage({ callback: msg.data.callback });',
							'      }',
							'    });',
							'  } else if (msg.data.reset) {',
							'    CONFETTI.reset();',
							'  } else if (msg.data.resize) {',
							'    SIZE.width = msg.data.resize.width;',
							'    SIZE.height = msg.data.resize.height;',
							'  } else if (msg.data.canvas) {',
							'    SIZE.width = msg.data.canvas.width;',
							'    SIZE.height = msg.data.canvas.height;',
							'    CONFETTI = module.exports.create(msg.data.canvas);',
							'  }',
							'}',
						].join(`
`);
						try {
							y = new Worker(URL.createObjectURL(new Blob([$])));
						} catch (Z) {
							return (
								typeof console !== void 0 &&
									typeof console.warn == 'function' &&
									console.warn('\u{1F38A} Could not load worker', Z),
								null
							);
						}
						N(y);
					}
					return y;
				};
			})(),
			u = {
				particleCount: 50,
				angle: 90,
				spread: 45,
				startVelocity: 45,
				decay: 0.9,
				gravity: 1,
				drift: 0,
				ticks: 200,
				x: 0.5,
				y: 0.5,
				shapes: ['square', 'circle'],
				zIndex: 100,
				colors: [
					'#26ccff',
					'#a25afd',
					'#ff5e7e',
					'#88ff5a',
					'#fcff42',
					'#ffa62d',
					'#ff36ff',
				],
				disableForReducedMotion: !1,
				scalar: 1,
			};
		function f(y, v) {
			return v ? v(y) : y;
		}
		function d(y) {
			return y != null;
		}
		function h(y, v, G) {
			return f(y && d(y[v]) ? y[v] : u[v], G);
		}
		function g(y) {
			return y < 0 ? 0 : Math.floor(y);
		}
		function _(y, v) {
			return Math.floor(Math.random() * (v - y)) + y;
		}
		function R(y) {
			return parseInt(y, 16);
		}
		function S(y) {
			return y.map(j);
		}
		function j(y) {
			var v = String(y).replace(/[^0-9a-f]/gi, '');
			return (
				v.length < 6 && (v = v[0] + v[0] + v[1] + v[1] + v[2] + v[2]),
				{
					r: R(v.substring(0, 2)),
					g: R(v.substring(2, 4)),
					b: R(v.substring(4, 6)),
				}
			);
		}
		function D(y) {
			var v = h(y, 'origin', Object);
			return (v.x = h(v, 'x', Number)), (v.y = h(v, 'y', Number)), v;
		}
		function b(y) {
			(y.width = document.documentElement.clientWidth),
				(y.height = document.documentElement.clientHeight);
		}
		function P(y) {
			var v = y.getBoundingClientRect();
			(y.width = v.width), (y.height = v.height);
		}
		function W(y) {
			var v = document.createElement('canvas');
			return (
				(v.style.position = 'fixed'),
				(v.style.top = '0px'),
				(v.style.left = '0px'),
				(v.style.pointerEvents = 'none'),
				(v.style.zIndex = y),
				v
			);
		}
		function A(y, v, G, N, $, Z, ee, ne, ce) {
			y.save(),
				y.translate(v, G),
				y.rotate(Z),
				y.scale(N, $),
				y.arc(0, 0, 1, ee, ne, ce),
				y.restore();
		}
		function E(y) {
			var v = y.angle * (Math.PI / 180),
				G = y.spread * (Math.PI / 180);
			return {
				x: y.x,
				y: y.y,
				wobble: Math.random() * 10,
				wobbleSpeed: Math.min(0.11, Math.random() * 0.1 + 0.05),
				velocity: y.startVelocity * 0.5 + Math.random() * y.startVelocity,
				angle2D: -v + (0.5 * G - Math.random() * G),
				tiltAngle: (Math.random() * (0.75 - 0.25) + 0.25) * Math.PI,
				color: y.color,
				shape: y.shape,
				tick: 0,
				totalTicks: y.ticks,
				decay: y.decay,
				drift: y.drift,
				random: Math.random() + 2,
				tiltSin: 0,
				tiltCos: 0,
				wobbleX: 0,
				wobbleY: 0,
				gravity: y.gravity * 3,
				ovalScalar: 0.6,
				scalar: y.scalar,
			};
		}
		function B(y, v) {
			(v.x += Math.cos(v.angle2D) * v.velocity + v.drift),
				(v.y += Math.sin(v.angle2D) * v.velocity + v.gravity),
				(v.wobble += v.wobbleSpeed),
				(v.velocity *= v.decay),
				(v.tiltAngle += 0.1),
				(v.tiltSin = Math.sin(v.tiltAngle)),
				(v.tiltCos = Math.cos(v.tiltAngle)),
				(v.random = Math.random() + 2),
				(v.wobbleX = v.x + 10 * v.scalar * Math.cos(v.wobble)),
				(v.wobbleY = v.y + 10 * v.scalar * Math.sin(v.wobble));
			var G = v.tick++ / v.totalTicks,
				N = v.x + v.random * v.tiltCos,
				$ = v.y + v.random * v.tiltSin,
				Z = v.wobbleX + v.random * v.tiltCos,
				ee = v.wobbleY + v.random * v.tiltSin;
			return (
				(y.fillStyle =
					'rgba(' +
					v.color.r +
					', ' +
					v.color.g +
					', ' +
					v.color.b +
					', ' +
					(1 - G) +
					')'),
				y.beginPath(),
				v.shape === 'circle'
					? y.ellipse
						? y.ellipse(
								v.x,
								v.y,
								Math.abs(Z - N) * v.ovalScalar,
								Math.abs(ee - $) * v.ovalScalar,
								(Math.PI / 10) * v.wobble,
								0,
								2 * Math.PI
						  )
						: A(
								y,
								v.x,
								v.y,
								Math.abs(Z - N) * v.ovalScalar,
								Math.abs(ee - $) * v.ovalScalar,
								(Math.PI / 10) * v.wobble,
								0,
								2 * Math.PI
						  )
					: (y.moveTo(Math.floor(v.x), Math.floor(v.y)),
					  y.lineTo(Math.floor(v.wobbleX), Math.floor($)),
					  y.lineTo(Math.floor(Z), Math.floor(ee)),
					  y.lineTo(Math.floor(N), Math.floor(v.wobbleY))),
				y.closePath(),
				y.fill(),
				v.tick < v.totalTicks
			);
		}
		function w(y, v, G, N, $) {
			var Z = v.slice(),
				ee = y.getContext('2d'),
				ne,
				ce,
				Se = c(function (le) {
					function Je() {
						(ne = ce = null), ee.clearRect(0, 0, N.width, N.height), $(), le();
					}
					function Te() {
						n &&
							!(N.width === i.width && N.height === i.height) &&
							((N.width = y.width = i.width), (N.height = y.height = i.height)),
							!N.width &&
								!N.height &&
								(G(y), (N.width = y.width), (N.height = y.height)),
							ee.clearRect(0, 0, N.width, N.height),
							(Z = Z.filter(function (ie) {
								return B(ee, ie);
							})),
							Z.length ? (ne = a.frame(Te)) : Je();
					}
					(ne = a.frame(Te)), (ce = Je);
				});
			return {
				addFettis: function (le) {
					return (Z = Z.concat(le)), Se;
				},
				canvas: y,
				promise: Se,
				reset: function () {
					ne && a.cancel(ne), ce && ce();
				},
			};
		}
		function te(y, v) {
			var G = !y,
				N = !!h(v || {}, 'resize'),
				$ = h(v, 'disableForReducedMotion', Boolean),
				Z = o && !!h(v || {}, 'useWorker'),
				ee = Z ? l() : null,
				ne = G ? b : P,
				ce = y && ee ? !!y.__confetti_initialized : !1,
				Se =
					typeof matchMedia == 'function' &&
					matchMedia('(prefers-reduced-motion)').matches,
				le;
			function Je(ie, ot, be) {
				for (
					var Ie = h(ie, 'particleCount', g),
						st = h(ie, 'angle', Number),
						Tt = h(ie, 'spread', Number),
						p = h(ie, 'startVelocity', Number),
						m = h(ie, 'decay', Number),
						C = h(ie, 'gravity', Number),
						x = h(ie, 'drift', Number),
						T = h(ie, 'colors', S),
						M = h(ie, 'ticks', Number),
						F = h(ie, 'shapes'),
						O = h(ie, 'scalar'),
						I = D(ie),
						k = Ie,
						z = [],
						U = y.width * I.x,
						H = y.height * I.y;
					k--;

				)
					z.push(
						E({
							x: U,
							y: H,
							angle: st,
							spread: Tt,
							startVelocity: p,
							color: T[k % T.length],
							shape: F[_(0, F.length)],
							ticks: M,
							decay: m,
							gravity: C,
							drift: x,
							scalar: O,
						})
					);
				return le ? le.addFettis(z) : ((le = w(y, z, ne, ot, be)), le.promise);
			}
			function Te(ie) {
				var ot = $ || h(ie, 'disableForReducedMotion', Boolean),
					be = h(ie, 'zIndex', Number);
				if (ot && Se)
					return c(function (p) {
						p();
					});
				G && le
					? (y = le.canvas)
					: G && !y && ((y = W(be)), document.body.appendChild(y)),
					N && !ce && ne(y);
				var Ie = { width: y.width, height: y.height };
				ee && !ce && ee.init(y),
					(ce = !0),
					ee && (y.__confetti_initialized = !0);
				function st() {
					if (ee) {
						var p = {
							getBoundingClientRect: function () {
								if (!G) return y.getBoundingClientRect();
							},
						};
						ne(p),
							ee.postMessage({ resize: { width: p.width, height: p.height } });
						return;
					}
					Ie.width = Ie.height = null;
				}
				function Tt() {
					(le = null),
						N && t.removeEventListener('resize', st),
						G && y && (document.body.removeChild(y), (y = null), (ce = !1));
				}
				return (
					N && t.addEventListener('resize', st, !1),
					ee ? ee.fire(ie, Ie, Tt) : Je(ie, Ie, Tt)
				);
			}
			return (
				(Te.reset = function () {
					ee && ee.reset(), le && le.reset();
				}),
				Te
			);
		}
		var ge;
		function Q() {
			return ge || (ge = te(null, { useWorker: !0, resize: !0 })), ge;
		}
		(r.exports = function () {
			return Q().apply(this, arguments);
		}),
			(r.exports.reset = function () {
				Q().reset();
			}),
			(r.exports.create = te);
	})(
		(function () {
			return typeof window < 'u'
				? window
				: typeof self < 'u'
				? self
				: this || {};
		})(),
		Ur,
		!1
	);
	const ds = Ur.exports;
	Ur.exports.create;
	function vc(e = {}) {
		const {
			duration: t = 8 * 1e3,
			startVelocity: r = 30,
			spread: n = 360,
			ticks: i = 60,
			zIndex: o = 100,
		} = e;
		return {
			play: () => {
				const c = Date.now() + t,
					a = setInterval(() => {
						const l = c - Date.now();
						if (l <= 0) return clearInterval(a);
						const u = 50 * (l / t);
						ds(
							Object.assign(
								{},
								{ startVelocity: r, spread: n, ticks: i, zIndex: o },
								{ particleCount: u, origin: { x: 0.3, y: Math.random() - 0.2 } }
							)
						),
							ds(
								Object.assign(
									{},
									{ startVelocity: r, spread: n, ticks: i, zIndex: o },
									{
										particleCount: u,
										origin: { x: 0.7, y: Math.random() - 0.2 },
									}
								)
							);
					}, 250);
			},
		};
	}
	const Kd = (e) => (xn('data-v-ad30e039'), (e = e()), Pn(), e),
		qd = Kd(() =>
			J(
				'svg',
				{
					t: '1666941694152',
					class: 'icon',
					viewBox: '0 0 1024 1024',
					version: '1.1',
					xmlns: 'http://www.w3.org/2000/svg',
					'p-id': '2915',
					width: '30',
					height: '30',
				},
				[
					J('path', {
						d: 'M808.768 197.312c10.432 0 17.408 6.912 17.408 17.344l0 485.568c0 10.368-6.976 17.344-17.408 17.344l-87.296 0c-19.136 0-34.944 15.552-34.944 34.624 0 19.136 15.808 34.688 34.944 34.688l104.768 0c38.464 0 69.824-31.168 69.824-69.312l0-520.32C896 159.168 864.64 128 826.176 128l-384 0c-38.4 0-69.824 31.232-69.824 69.312l0 34.688c0 19.072 15.68 34.688 34.88 34.688 19.2 0 34.88-15.616 34.88-34.688L442.112 214.656c0-10.432 6.976-17.344 17.408-17.344L808.768 197.312z',
						'p-id': '2916',
						fill: '#e6e6e6',
					}),
					J('path', {
						d: 'M128 363.968l0 469.376C128 867.84 160.32 896 199.808 896l394.944 0c39.488 0 71.872-28.16 71.872-62.656L666.624 363.968c0-34.432-32.384-62.592-71.872-62.592L199.808 301.376C160.32 301.376 128 329.536 128 363.968z',
						'p-id': '2917',
						fill: '#e6e6e6',
					}),
				],
				-1
			)
		),
		Yd = [qd],
		Xd = it({
			__name: 'CopyLink',
			setup(e) {
				const { copy: t } = Wf(),
					r = fe(!1),
					n = Xt(),
					i = () => {
						t(n.link).then(() => {
							(r.value = !0),
								setTimeout(() => {
									r.value = !1;
								}, 1500);
						});
					};
				return (o, s) => (
					de(),
					ye('div', null, [
						J(
							'button',
							{
								flex: '',
								'flex-row': '',
								'place-items-center': '',
								'place-content-center': '',
								'w-10': '',
								'h-7': '',
								rounded: '',
								onClick: i,
							},
							Yd
						),
					])
				);
			},
		}),
		yc = St(Xd, [['__scopeId', 'data-v-ad30e039']]),
		Si = it({
			__name: 'Scrim',
			props: { hide: { type: Boolean } },
			setup(e) {
				return (t, r) => (
					de(),
					ye(
						'div',
						{
							absolute: '',
							'inset-0': '',
							'bg-black': '',
							'z-5': '',
							'rounded-md': '',
							'bg-opacity-50': '',
							'backdrop-blur-sm': '',
							grid: '',
							'place-content-center': '',
							'place-items-center': '',
							'gap-4': '',
							'transition-opacity': '',
							'opacity-0': '',
							'pointer-events-none': '',
							class: yt({ '!pointer-events-auto !opacity-100': !e.hide }),
						},
						[Rn(t.$slots, 'default')],
						2
					)
				);
			},
		}),
		Zd = { relative: '' },
		Qd = J(
			'div',
			{ flex: '', 'flex-row': '', 'items-center': '' },
			[
				J(
					'span',
					null,
					' \u590D\u5236\u94FE\u63A5\u9080\u8BF7\u522B\u4EBA\u52A0\u5165\u5427~ '
				),
			],
			-1
		),
		ep = {
			flex: '',
			'flex-row': '',
			'items-center': '',
			'bg-dark-500': '',
			border: '1 dark-50',
			rounded: '',
			'h-10': '',
		},
		tp = ['value'],
		rp = Ct(' \u53D6\u6D88\u9080\u8BF7'),
		np = it({
			__name: 'RemoteGame',
			setup(e) {
				const { play: t } = vc(),
					r = fe(),
					n = Xt(),
					i = fe(!1);
				n.localGame.onWon(() => {
					t(), (i.value = !0);
				});
				const o = () => {
					setTimeout(() => {
						r.value && r.value.select();
					}, 10);
				};
				return (s, c) => {
					const a = Jd,
						l = Gi,
						u = Ta;
					return (
						de(),
						ye('div', null, [
							ue(a, { 'mb-2': '', op50: '', 'filter-grayscale-100': '' }),
							J('div', Zd, [
								ue(
									Si,
									{ hide: !Y(n).isWaitingForOtherPlayer },
									{
										default: qe(() => [
											Qd,
											J('div', ep, [
												J(
													'input',
													{
														ref_key: 'input',
														ref: r,
														border: 'r-1 dark-100',
														'h-full': '',
														type: 'text',
														'bg-transparent': '',
														value: Y(n).link,
														'px-2': '',
														'text-sm': '',
														outline: 'focus:none',
														onClick: o,
														onFocus: o,
														'w-70': '',
													},
													null,
													40,
													tp
												),
												ue(yc),
											]),
											J('div', null, [
												ue(
													l,
													{
														onClick:
															c[0] ||
															(c[0] = (f) => Y(n).closeMultiplayerGame()),
													},
													{ default: qe(() => [rp]), _: 1 }
												),
											]),
										]),
										_: 1,
									},
									8,
									['hide']
								),
								ue(
									u,
									{
										board: Y(n).remoteGame.board,
										score: Y(n).remoteGame.score,
										op50: '',
										'filter-grayscale-100': '',
									},
									null,
									8,
									['board', 'score']
								),
							]),
						])
					);
				};
			},
		}),
		Gr = (e) => (xn('data-v-a4772f88'), (e = e()), Pn(), e),
		ip = { flex: '', 'max-w': '600px', 'w-full': '', 'mx-auto': '' },
		op = { 'text-left': '', 'self-end': '' },
		sp = {
			'lt-md:text-7xl': '',
			'text-7xl': '',
			'font-black': '',
			'leading-18': '',
			class: 'myScore',
		},
		ap = Gr(() =>
			J('div', { 'text-3xl': '', op60: '' }, '\u5F53\u524D\u5206\u6570', -1)
		),
		cp = Gr(() =>
			J(
				'div',
				{ op50: '' },
				'\u6309\u65B9\u5411\u952E\u79FB\u52A8\u65B9\u5757',
				-1
			)
		),
		lp = Gr(() => J('span', { 'flex-1': '' }, null, -1)),
		up = { flex: '', 'flex-col': '' },
		fp = { 'text-right': '', op50: '', 'font-medium': '', 'text-xl': '' },
		dp = { 'text-3xl': '' },
		pp = Gr(() =>
			J(
				'div',
				{ op200: '', 'font-bold': '', 'rounded-full': '', 'text-lg': '' },
				'\u6700\u9AD8\u5206',
				-1
			)
		),
		hp = Gr(() => J('span', { 'flex-1': '' }, null, -1)),
		mp = {
			flex: '',
			'flex-row': '',
			'lt-md:flex-col': '',
			'lt-md:pt-2': '',
			'gap-2': '',
		},
		gp = Ct('\u91CD\u65B0\u5F00\u59CB'),
		vp = it({
			__name: 'GameControls',
			setup(e) {
				const t = Xt(),
					r = Oa(
						ke(() => t.localGame.score),
						{ duration: 100 }
					);
				return (n, i) => {
					const o = Gi;
					return (
						de(),
						ye('div', ip, [
							J('div', op, [J('div', sp, Wt(Y(r).toFixed(0)), 1), ap, cp]),
							lp,
							J('div', up, [
								J('div', fp, [J('div', dp, Wt(Y(t).highScore), 1), pp]),
								hp,
								J('div', mp, [
									ue(
										o,
										{
											onClick:
												i[0] ||
												(i[0] = (s) =>
													Y(t).isMultiplayerGameOpen
														? Y(t).closeMultiplayerGame()
														: Y(t).openMultiplayerGame()),
										},
										{
											default: qe(() => [
												Ct(
													Wt(
														Y(t).isMultiplayerGameOpen
															? '\u9000\u51FA'
															: '\u591A\u4EBA\u6A21\u5F0F'
													),
													1
												),
											]),
											_: 1,
										}
									),
									ue(
										o,
										{
											onClick: i[1] || (i[1] = (s) => Y(t).startNewGame()),
											class: 'renew',
										},
										{ default: qe(() => [gp]), _: 1 }
									),
								]),
							]),
						])
					);
				};
			},
		}),
		yp = St(vp, [['__scopeId', 'data-v-a4772f88']]),
		_c = (e) => (xn('data-v-e0f3ef49'), (e = e()), Pn(), e),
		_p = { relative: '' },
		bp = _c(() =>
			J(
				'div',
				{ 'text-5xl': '', 'font-black': '', class: 'defeatFont' },
				'\u5931\u8D25~',
				-1
			)
		),
		Cp = Ct(' \u518D\u6765\u4E00\u5C40 '),
		Sp = _c(() =>
			J(
				'div',
				{ 'text-5xl': '', 'font-black': '' },
				'\u4F60\u8D62\u4E86\uFF01',
				-1
			)
		),
		Tp = Ct(' \u7EE7\u7EED\u6E38\u620F '),
		xp = Ct(' \u518D\u6765\u4E00\u5C40 '),
		Pp = it({
			__name: 'LocalGame',
			emits: ['up', 'down', 'left', 'right', 'update:seed'],
			setup(e, { emit: t }) {
				const r = fe(),
					{ play: n } = vc(),
					{ direction: i } = td(r, { threshold: 10 }),
					o = Xt(),
					s = fe(!1);
				We(i, () => {
					i.value === et.UP && o.localGame.up(),
						i.value === et.DOWN && o.localGame.down(),
						i.value === et.LEFT && o.localGame.left(),
						i.value === et.RIGHT && o.localGame.right();
				}),
					o.localGame.onWon(() => {
						n(), (s.value = !0);
					}),
					We(
						() => o.localGame.hasWon,
						() => {
							o.localGame.hasWon || (s.value = !1);
						}
					);
				const c = ke(
					() => !(s.value || o.localGame.isGameOver || o.remoteGame.hasWon)
				);
				return (
					Kr(['ArrowUp', 'w'], () => {
						!c.value || (o.localGame.up(), t('up'));
					}),
					Kr(['ArrowDown', 's'], () => {
						!c.value || (o.localGame.down(), t('down'));
					}),
					Kr(['ArrowLeft', 'a'], () => {
						!c.value || (o.localGame.left(), t('left'));
					}),
					Kr(['ArrowRight', 'd'], () => {
						!c.value || (o.localGame.right(), t('right'));
					}),
					(a, l) => {
						const u = yp,
							f = Gi,
							d = Ta;
						return (
							de(),
							ye('div', null, [
								ue(u, { 'mb-2': '' }),
								J('div', _p, [
									ue(
										Si,
										{
											hide: !(
												Y(o).localGame.isGameOver || Y(o).remoteGame.hasWon
											),
										},
										{
											default: qe(() => [
												bp,
												ue(
													f,
													{
														onClick:
															l[0] || (l[0] = (h) => Y(o).startNewGame()),
													},
													{ default: qe(() => [Cp]), _: 1 }
												),
											]),
											_: 1,
										},
										8,
										['hide']
									),
									ue(
										Si,
										{ hide: !s.value },
										{
											default: qe(() => [
												Sp,
												Y(o).isMultiplayerGameOpen
													? (de(),
													  Br(
															f,
															{
																key: 1,
																onClick:
																	l[2] || (l[2] = (h) => Y(o).startNewGame()),
															},
															{ default: qe(() => [xp]), _: 1 }
													  ))
													: (de(),
													  Br(
															f,
															{
																key: 0,
																onClick: l[1] || (l[1] = (h) => (s.value = !1)),
															},
															{ default: qe(() => [Tp]), _: 1 }
													  )),
											]),
											_: 1,
										},
										8,
										['hide']
									),
									J(
										'div',
										{ ref_key: 'board', ref: r },
										[
											ue(
												d,
												{
													board: Y(o).localGame.board,
													score: Y(o).localGame.score,
												},
												null,
												8,
												['board', 'score']
											),
										],
										512
									),
								]),
							])
						);
					}
				);
			},
		}),
		kp = St(Pp, [['__scopeId', 'data-v-e0f3ef49']]),
		Ep = {},
		Rp = { 'h-18': '', fixed: '', 'top-0': '', 'left-0': '', 'right-0': '' },
		Op = J(
			'div',
			{
				'max-w-1200px': '',
				'h-full': '',
				'mx-auto': '',
				flex: '',
				'flex-row': '',
				'items-center': '',
				'px-4': '',
			},
			[J('span', { 'flex-1': '' })],
			-1
		),
		Mp = [Op];
	function Dp(e, t) {
		return de(), ye('nav', Rp, Mp);
	}
	const Ip = St(Ep, [['render', Dp]]),
		Ap = {},
		wp = {
			class: 'animate-spin -ml-1 mr-3 h-12 w-12 dark:text-white',
			fill: 'none',
			viewBox: '0 0 24 24',
		},
		jp = J(
			'circle',
			{
				class: 'opacity-25',
				cx: '12',
				cy: '12',
				r: '10',
				stroke: 'currentColor',
				'stroke-width': '4',
			},
			null,
			-1
		),
		Fp = J(
			'path',
			{
				class: 'opacity-75',
				fill: 'currentColor',
				d: 'M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z',
			},
			null,
			-1
		),
		Bp = [jp, Fp];
	function Lp(e, t) {
		return de(), ye('svg', wp, Bp);
	}
	const $p = St(Ap, [['render', Lp]]),
		Np = {
			fixed: '',
			'top-0': '',
			'left-0': '',
			'right-0': '',
			'p-4': '',
			flex: '',
			'flex-row': '',
			'place-items-center': '',
		},
		Up = {
			'bg-dark-200': '',
			rounded: '',
			'mx-auto': '',
			class: 'gt-lg:hidden',
			'shadow-lg': '',
			p2: '',
			flex: '',
			'flex-row': '',
		},
		Gp = { flex: '', 'flex-col': '', 'pl-2': '', 'justify-center': '' },
		zp = J('span', { 'text-lg': '', 'font-medium': '' }, ' \u5BF9\u624B ', -1),
		Wp = { mt: '-1', op50: '' },
		Hp = { key: 1, 'p-2': '', flex: '', 'flex-row': '', 'items-center': '' },
		Vp = J(
			'span',
			null,
			' \u7B49\u5F85\u5176\u4ED6\u73A9\u5BB6\u52A0\u5165\u4E2D... ',
			-1
		),
		Jp = it({
			__name: 'RemoteGameSmall',
			setup(e) {
				const t = Xt();
				return (r, n) => {
					const i = Sa,
						o = yc;
					return (
						de(),
						ye('div', Np, [
							J('div', Up, [
								Y(t).isWaitingForOtherPlayer
									? (de(),
									  ye('div', Hp, [
											ue($p, { 'w-6': '', 'h-6': '' }),
											Vp,
											ue(o, { 'ml-2': '' }),
									  ]))
									: (de(),
									  ye(
											xe,
											{ key: 0 },
											[
												ue(
													i,
													{
														value: Y(t).remoteGame.largestTile,
														'w-14': '',
														'h-14': '',
														op50: '',
														'filter-grayscale-100': '',
													},
													{
														default: qe(() => [
															Ct(Wt(Y(t).remoteGame.largestTile), 1),
														]),
														_: 1,
													},
													8,
													['value']
												),
												J('div', Gp, [
													zp,
													J(
														'span',
														Wp,
														' \u5206\u6570: ' + Wt(Y(t).remoteGame.score),
														1
													),
												]),
											],
											64
									  )),
							]),
						])
					);
				};
			},
		}),
		Kp = (e) => (xn('data-v-43039b9c'), (e = e()), Pn(), e),
		qp = {
			'h-screen': '',
			flex: '',
			'flex-col': '',
			'bg-primary': '',
			'text-foreground': '',
			'select-none': '',
		},
		Yp = { 'p-4': '', grid: '', 'h-full': '', 'place-items-center': '' },
		Xp = {
			key: 0,
			'font-bold': '',
			'text-center': '',
			'text-2xl': '',
			'mt-4': '',
		},
		Zp = { class: 'lt-lg:hidden anotherBored' },
		Qp = Kp(() =>
			J(
				'div',
				{
					'font-bold': '',
					'text-center': '',
					'text-2xl': '',
					'mt-4': '',
					class: 'otherName',
				},
				' \u5BF9\u624B ',
				-1
			)
		),
		eh = it({
			__name: 'App',
			setup(e) {
				const t = Xt(),
					n = new URLSearchParams(window.location.search).get('game');
				return (
					n && t.joinMultiplayerGame(n),
					(i, o) => {
						const s = Ip,
							c = kp,
							a = np,
							l = Ys('auto-animate');
						return (
							de(),
							ye(
								xe,
								null,
								[
									ue(s),
									J('main', qp, [
										J('div', Yp, [
											qs(
												(de(),
												ye(
													'div',
													{
														grid: '',
														class: yt({
															'lg:grid-cols-2': Y(t).isMultiplayerGameOpen,
														}),
														'grid-cols-1': '',
														'gap-4': '',
														'place-content-center': '',
														'max-w': '1200px',
														'w-full': '',
														'mx-auto': '',
													},
													[
														J(
															'div',
															{
																'max-w': '600px',
																'mx-auto': '',
																'w-full': '',
																class: yt({
																	'lt-lg:pt-16': Y(t).isMultiplayerGameOpen,
																}),
															},
															[
																ue(c),
																Y(t).isMultiplayerGameOpen
																	? (de(), ye('div', Xp, ' \u6211 '))
																	: bo('', !0),
															],
															2
														),
														Y(t).isMultiplayerGameOpen
															? (de(),
															  ye(
																	xe,
																	{ key: 0 },
																	[
																		J('div', Zp, [ue(a), Qp]),
																		ue(Jp, { class: 'lg:hidden' }),
																	],
																	64
															  ))
															: bo('', !0),
													],
													2
												)),
												[[l, { duration: 100 }]]
											),
										]),
									]),
								],
								64
							)
						);
					}
				);
			},
		}),
		th = St(eh, [['__scopeId', 'data-v-43039b9c']]);
	Ku(th).use(ff).use(pf()).mount('#gameTogether');
});
export default rh();
